diff --git a/ui/app/AppLayouts/Wallet/popups/swap/SwapModal.qml b/ui/app/AppLayouts/Wallet/popups/swap/SwapModal.qml index 6f1aad7200..5b2cf504e9 100644 --- a/ui/app/AppLayouts/Wallet/popups/swap/SwapModal.qml +++ b/ui/app/AppLayouts/Wallet/popups/swap/SwapModal.qml @@ -442,7 +442,7 @@ StatusDialog { accountAddress: root.swapAdaptor.selectedAccount.address accountEmoji: root.swapAdaptor.selectedAccount.emoji accountColor: Utils.getColorForId(root.swapAdaptor.selectedAccount.colorId) - accountBalanceFormatted: payPanel.accountBalanceFormatted // FIXME https://github.com/status-im/status-desktop/issues/15554 + accountBalanceFormatted: root.swapAdaptor.selectedAccount.accountBalance.formattedBalance networkShortName: networkFilter.singleSelectionItemData.shortName networkName: networkFilter.singleSelectionItemData.chainName diff --git a/ui/app/AppLayouts/Wallet/popups/swap/SwapModalAdaptor.qml b/ui/app/AppLayouts/Wallet/popups/swap/SwapModalAdaptor.qml index 79c1d1a1d1..5ee5921329 100644 --- a/ui/app/AppLayouts/Wallet/popups/swap/SwapModalAdaptor.qml +++ b/ui/app/AppLayouts/Wallet/popups/swap/SwapModalAdaptor.qml @@ -38,6 +38,7 @@ QObject { // Probably this data transformation should live there since they have common base. readonly property var nonWatchAccounts: SortFilterProxyModel { sourceModel: root.swapStore.accounts + delayed: true // Delayed to allow `processAccountBalance` dependencies to be resolved filters: ValueFilter { roleName: "canSend" value: true @@ -49,7 +50,17 @@ QObject { proxyRoles: [ FastExpressionRole { name: "accountBalance" - expression: d.processAccountBalance(model.address) + expression: { + // dependencies + root.swapFormData.fromTokensKey + root.fromToken + root.fromToken.symbol + root.fromToken.decimals + root.swapFormData.selectedNetworkChainId + root.swapFormData.fromTokensKey + + return d.processAccountBalance(model.address) + } expectedRoles: ["address"] }, FastExpressionRole {