diff --git a/src/pages/RFOX/components/AddressSelection.tsx b/src/pages/RFOX/components/AddressSelection.tsx index 45adf492266..067c501d224 100644 --- a/src/pages/RFOX/components/AddressSelection.tsx +++ b/src/pages/RFOX/components/AddressSelection.tsx @@ -22,6 +22,7 @@ import { validateAddress } from 'lib/address/address' import { selectAccountIdByAccountNumberAndChainId, selectAccountNumberByAccountId, + selectPortfolioAccountIdsByAssetIdFilter, } from 'state/slices/selectors' import { useAppSelector } from 'state/store' @@ -218,6 +219,11 @@ export const AddressSelection: FC = ({ const filter = useMemo(() => ({ accountId: maybeRuneAccountId }), [maybeRuneAccountId]) const accountNumber = useAppSelector(state => selectAccountNumberByAccountId(state, filter)) + const accountsFilter = useMemo(() => ({ assetId: thorchainAssetId }), []) + const runeAccounts = useAppSelector(state => + selectPortfolioAccountIdsByAssetIdFilter(state, accountsFilter), + ) + const CustomAddress = useCallback(() => { if (!maybeSelectedRuneAddress) return @@ -237,9 +243,9 @@ export const AddressSelection: FC = ({ isDisabled={!maybeSelectedRuneAddress} value={maybeSelectedRuneAddress ?? ''} > - {(!Boolean(currentRuneAddress) && maybeRuneAccountId) || + {(!Boolean(currentRuneAddress) && maybeRuneAccountId && setStepIndex) || accountNumber !== undefined || - !setStepIndex ? ( + (!setStepIndex && runeAccounts.length) ? ( = ({ setStepIndex, shouldDisableAccountDropdown, accountNumber, + runeAccounts, ]) const addressSelectionLabel = useMemo( diff --git a/src/pages/RFOX/components/Stake/StakeInput.tsx b/src/pages/RFOX/components/Stake/StakeInput.tsx index ebed60547db..c563a6eb624 100644 --- a/src/pages/RFOX/components/Stake/StakeInput.tsx +++ b/src/pages/RFOX/components/Stake/StakeInput.tsx @@ -216,7 +216,7 @@ export const StakeInput: React.FC = ({ }, } = useRfoxStake({ amountCryptoBaseUnit, - runeAddress, + runeAddress: currentRuneAddress || runeAddress, stakingAssetId, stakingAssetAccountId, hasEnoughBalance,