diff --git a/storybook/pages/AccountSelectorPage.qml b/storybook/pages/AccountSelectorPage.qml index 1174bff22d1..28f446c46fe 100644 --- a/storybook/pages/AccountSelectorPage.qml +++ b/storybook/pages/AccountSelectorPage.qml @@ -10,6 +10,7 @@ import shared.controls import shared.stores import AppLayouts.Wallet.stores +import AppLayouts.Wallet.storesmocks as WalletStoreMocks import AppLayouts.Wallet.adaptors import utils @@ -25,7 +26,7 @@ SplitView { readonly property var flatNetworks: NetworksModel.flatNetworks readonly property var assetsStore: WalletAssetsStore { id: thisWalletAssetStore - walletTokensStore: TokensStore { + walletTokensStore: WalletStoreMocks.TokensStore { tokenGroupsModel: TokenGroupsModel {} } readonly property var baseGroupedAccountAssetModel: GroupedAccountsAssetsModel {} diff --git a/storybook/pages/AssetsDetailViewPage.qml b/storybook/pages/AssetsDetailViewPage.qml index 4132a4efbd0..8ee45e5e2f5 100644 --- a/storybook/pages/AssetsDetailViewPage.qml +++ b/storybook/pages/AssetsDetailViewPage.qml @@ -3,6 +3,7 @@ import QtQuick.Layouts import AppLayouts.Wallet.views import AppLayouts.Wallet.stores as WalletStores +import AppLayouts.Wallet.storesmocks as WalletStoreMocks import shared.stores as SharedStores @@ -17,7 +18,7 @@ Item { AssetsDetailView { anchors.fill: parent - tokensStore: WalletStores.TokensStore {} + tokensStore: WalletStoreMocks.TokensStore {} currencyStore: SharedStores.CurrenciesStore {} networkConnectionStore: SharedStores.NetworkConnectionStore {} diff --git a/storybook/pages/BuyCryptoModalPage.qml b/storybook/pages/BuyCryptoModalPage.qml index 43fd943e9bb..9a976f4fdfb 100644 --- a/storybook/pages/BuyCryptoModalPage.qml +++ b/storybook/pages/BuyCryptoModalPage.qml @@ -10,6 +10,7 @@ import StatusQ.Core.Backpressure import AppLayouts.Wallet.popups.buy import AppLayouts.Wallet.stores +import AppLayouts.Wallet.storesmocks as WalletStoreMocks import AppLayouts.Wallet.adaptors import shared.stores @@ -53,7 +54,7 @@ SplitView { readonly property var currencyStore: CurrenciesStore {} readonly property var assetsStore: WalletAssetsStore { id: thisWalletAssetStore - walletTokensStore: TokensStore { + walletTokensStore: WalletStoreMocks.TokensStore { tokenGroupsModel: TokenGroupsModel {} } readonly property var baseGroupedAccountAssetModel: GroupedAccountsAssetsModel {} diff --git a/storybook/pages/SendModalPage.qml b/storybook/pages/SendModalPage.qml index 6b3b84d37b8..1a38de15364 100644 --- a/storybook/pages/SendModalPage.qml +++ b/storybook/pages/SendModalPage.qml @@ -96,9 +96,31 @@ SplitView { function resetData() {} walletAssetStore: root.walletAssetStore - tokensStore.showCommunityAssetsInSend: showCommunityAssetsCheckBox.checked - tokensStore.displayAssetsBelowBalance: balanceThresholdCheckbox.checked - tokensStore.getDisplayAssetsBelowBalanceThresholdDisplayAmount: () => Number(balanceThresholdValue.text) + Component.onCompleted: { + if (tokensStore) { + tokensStore.showCommunityAssetsInSend = showCommunityAssetsCheckBox.checked + tokensStore.displayAssetsBelowBalance = balanceThresholdCheckbox.checked + tokensStore._displayAssetsBelowBalanceThresholdDisplayAmountFunc = () => Number(balanceThresholdValue.text) + } + } + } + + Connections { + target: showCommunityAssetsCheckBox + function onCheckedChanged() { + if (txStore.tokensStore) { + txStore.tokensStore.showCommunityAssetsInSend = showCommunityAssetsCheckBox.checked + } + } + } + + Connections { + target: balanceThresholdCheckbox + function onCheckedChanged() { + if (txStore.tokensStore) { + txStore.tokensStore.displayAssetsBelowBalance = balanceThresholdCheckbox.checked + } + } } NetworksStore { diff --git a/storybook/pages/SimpleSendModalPage.qml b/storybook/pages/SimpleSendModalPage.qml index bdbd8c923e2..c04dac0369e 100644 --- a/storybook/pages/SimpleSendModalPage.qml +++ b/storybook/pages/SimpleSendModalPage.qml @@ -16,6 +16,7 @@ import Storybook import AppLayouts.Wallet.popups.simpleSend import AppLayouts.Wallet.stores +import AppLayouts.Wallet.storesmocks as WalletStoreMocks import AppLayouts.Wallet.adaptors import utils @@ -34,9 +35,9 @@ SplitView { } readonly property WalletAssetsStore walletAssetStore: WalletAssetsStore { - walletTokensStore: TokensStore { + walletTokensStore: WalletStoreMocks.TokensStore { tokenGroupsModel: TokenGroupsModel{} - getDisplayAssetsBelowBalanceThresholdDisplayAmount: () => 0 + _displayAssetsBelowBalanceThresholdDisplayAmountFunc: () => 0 } } diff --git a/storybook/pages/SwapInputPanelPage.qml b/storybook/pages/SwapInputPanelPage.qml index 81640922b1e..c970dd65eaa 100644 --- a/storybook/pages/SwapInputPanelPage.qml +++ b/storybook/pages/SwapInputPanelPage.qml @@ -11,6 +11,7 @@ import shared.stores import shared.stores.send import AppLayouts.Wallet.stores +import AppLayouts.Wallet.storesmocks as WalletStoreMocks import AppLayouts.Wallet.panels import AppLayouts.Wallet.controls @@ -75,7 +76,7 @@ SplitView { } walletAssetsStore: WalletAssetsStore { id: thisWalletAssetStore - walletTokensStore: TokensStore { + walletTokensStore: WalletStoreMocks.TokensStore { tokenGroupsModel: TokenGroupsModel {} } readonly property var baseGroupedAccountAssetModel: GroupedAccountsAssetsModel {} diff --git a/storybook/pages/SwapModalPage.qml b/storybook/pages/SwapModalPage.qml index eb8320ab2d5..3993221ab5f 100644 --- a/storybook/pages/SwapModalPage.qml +++ b/storybook/pages/SwapModalPage.qml @@ -17,6 +17,7 @@ import Models import mainui import AppLayouts.Wallet.popups.swap import AppLayouts.Wallet.stores +import AppLayouts.Wallet.storesmocks as WalletStoreMocks import AppLayouts.stores as AppLayoutStores import shared.stores as SharedStores @@ -115,10 +116,10 @@ SplitView { signalName: "authenticateAndTransferSignal" } - TokensStore { + WalletStoreMocks.TokensStore { id: tokensStore tokenGroupsModel: TokenGroupsModel {} - getDisplayAssetsBelowBalanceThresholdDisplayAmount: () => 0 + _displayAssetsBelowBalanceThresholdDisplayAmountFunc: () => 0 } SwapModalAdaptor { diff --git a/storybook/pages/WalletAccountsSelectorAdaptorPage.qml b/storybook/pages/WalletAccountsSelectorAdaptorPage.qml index 858edebeda9..d1a47a0b49f 100644 --- a/storybook/pages/WalletAccountsSelectorAdaptorPage.qml +++ b/storybook/pages/WalletAccountsSelectorAdaptorPage.qml @@ -4,6 +4,7 @@ import QtQuick.Layouts import SortFilterProxyModel import AppLayouts.Wallet.stores +import AppLayouts.Wallet.storesmocks as WalletStoreMocks import AppLayouts.Wallet.adaptors import Storybook @@ -100,7 +101,7 @@ Item { readonly property var assetsStore: WalletAssetsStore { id: thisWalletAssetStore - walletTokensStore: TokensStore { + walletTokensStore: WalletStoreMocks.TokensStore { tokenGroupsModel: TokenGroupsModel {} } readonly property var baseGroupedAccountAssetModel: GroupedAccountsAssetsModel {} diff --git a/storybook/qmlTests/tests/tst_BuyCryptoModal.qml b/storybook/qmlTests/tests/tst_BuyCryptoModal.qml index 92f33509573..a3c3dc32fe5 100644 --- a/storybook/qmlTests/tests/tst_BuyCryptoModal.qml +++ b/storybook/qmlTests/tests/tst_BuyCryptoModal.qml @@ -14,6 +14,7 @@ import utils import AppLayouts.Wallet.popups.buy import AppLayouts.Wallet.stores +import AppLayouts.Wallet.storesmocks as WalletStoreMocks import shared.stores @@ -92,7 +93,7 @@ Item { } readonly property var assetsStore: WalletAssetsStore { id: thisWalletAssetStore - walletTokensStore: TokensStore { + walletTokensStore: WalletStoreMocks.TokensStore { tokenGroupsModel: TokenGroupsModel {} } } diff --git a/storybook/qmlTests/tests/tst_DAppsWorkflow.qml b/storybook/qmlTests/tests/tst_DAppsWorkflow.qml index 119e33c89f9..75ad509c172 100644 --- a/storybook/qmlTests/tests/tst_DAppsWorkflow.qml +++ b/storybook/qmlTests/tests/tst_DAppsWorkflow.qml @@ -16,6 +16,7 @@ import AppLayouts.Wallet.services.dapps.types import AppLayouts.Profile.stores import AppLayouts.Wallet.panels import AppLayouts.Wallet.stores as WalletStore +import AppLayouts.Wallet.storesmocks as WalletStoreMocks import AppLayouts.Wallet.popups.dapps import shared.stores @@ -313,7 +314,7 @@ Item { WalletStore.WalletAssetsStore { id: assetsStoreMock - walletTokensStore: WalletStore.TokensStore { + walletTokensStore: WalletStoreMocks.TokensStore { tokenGroupsModel: TokenGroupsModel {} } } @@ -581,7 +582,7 @@ Item { session.params.request.expiryTimestamp = (Date.now() - 10000) / 1000 verify(session.params.request.expiryTimestamp < Date.now() / 1000, "expected expiryTimestamp to be in the past") - + mockActiveSession(handler.accountsModel, handler.networksModel, sdk, topic) sdk.sessionRequestEvent(session) diff --git a/storybook/qmlTests/tests/tst_SwapInputPanel.qml b/storybook/qmlTests/tests/tst_SwapInputPanel.qml index e1e34347620..cf8887eb588 100644 --- a/storybook/qmlTests/tests/tst_SwapInputPanel.qml +++ b/storybook/qmlTests/tests/tst_SwapInputPanel.qml @@ -7,6 +7,7 @@ import StatusQ.Controls import StatusQ.Core.Utils import AppLayouts.Wallet.stores +import AppLayouts.Wallet.storesmocks as WalletStoreMocks import AppLayouts.Wallet.panels import AppLayouts.Wallet.popups.swap import AppLayouts.Wallet.adaptors @@ -36,7 +37,7 @@ Item { readonly property var accounts: WalletAccountsModel {} } walletAssetsStore: WalletAssetsStore { - walletTokensStore: TokensStore { + walletTokensStore: WalletStoreMocks.TokensStore { tokenGroupsModel: TokenGroupsModel {} tokenGroupsForChainModel: TokenGroupsModel { skipInitialLoad: true diff --git a/storybook/qmlTests/tests/tst_SwapModal.qml b/storybook/qmlTests/tests/tst_SwapModal.qml index 14cd9ff65f4..cce86913c28 100644 --- a/storybook/qmlTests/tests/tst_SwapModal.qml +++ b/storybook/qmlTests/tests/tst_SwapModal.qml @@ -1,4 +1,4 @@ -import QtQuick +import QtQuick import QtTest import StatusQ.Core @@ -15,6 +15,7 @@ import utils import shared.stores import AppLayouts.Wallet.popups.swap import AppLayouts.Wallet.stores +import AppLayouts.Wallet.storesmocks as WalletStoreMocks import AppLayouts.Wallet import AppLayouts.Wallet.adaptors @@ -52,7 +53,7 @@ Item { currencyStore: CurrenciesStore {} walletAssetsStore: WalletAssetsStore { id: thisWalletAssetStore - walletTokensStore: TokensStore { + walletTokensStore: WalletStoreMocks.TokensStore { tokenGroupsModel: TokenGroupsModel {} tokenGroupsForChainModel: TokenGroupsModel { skipInitialLoad: true @@ -61,7 +62,7 @@ Item { skipInitialLoad: true tokenGroupsForChainModel: thisWalletAssetStore.walletTokensStore.tokenGroupsForChainModel } - getDisplayAssetsBelowBalanceThresholdDisplayAmount: () => 0 + _displayAssetsBelowBalanceThresholdDisplayAmountFunc: () => 0 } readonly property var baseGroupedAccountAssetModel: GroupedAccountsAssetsModel {} } diff --git a/storybook/qmlTests/tests/tst_TokenSelectorViewAdaptor.qml b/storybook/qmlTests/tests/tst_TokenSelectorViewAdaptor.qml index cc80dc07d96..a92fc190732 100644 --- a/storybook/qmlTests/tests/tst_TokenSelectorViewAdaptor.qml +++ b/storybook/qmlTests/tests/tst_TokenSelectorViewAdaptor.qml @@ -8,6 +8,7 @@ import StatusQ import StatusQ.Core.Utils import AppLayouts.Wallet.stores +import AppLayouts.Wallet.storesmocks as WalletStoreMocks import AppLayouts.Wallet.adaptors import QtModelsToolkit @@ -26,7 +27,7 @@ Item { readonly property var flatNetworks: NetworksModel.flatNetworks readonly property var assetsStore: WalletAssetsStore { - walletTokensStore: TokensStore { + walletTokensStore: WalletStoreMocks.TokensStore { tokenGroupsModel: TokenGroupsModel {} tokenGroupsForChainModel: TokenGroupsModel { skipInitialLoad: true diff --git a/storybook/qmlTests/tests/tst_WalletAccountsSelectorAdaptor.qml b/storybook/qmlTests/tests/tst_WalletAccountsSelectorAdaptor.qml index adaf1690c5d..b13e46366b6 100644 --- a/storybook/qmlTests/tests/tst_WalletAccountsSelectorAdaptor.qml +++ b/storybook/qmlTests/tests/tst_WalletAccountsSelectorAdaptor.qml @@ -5,6 +5,7 @@ import StatusQ import StatusQ.Core.Utils import AppLayouts.Wallet.stores +import AppLayouts.Wallet.storesmocks as WalletStoreMocks import AppLayouts.Wallet.adaptors import Models @@ -109,7 +110,7 @@ Item { readonly property var flatNetworks: NetworksModel.flatNetworks readonly property var assetsStore: WalletAssetsStore { id: thisWalletAssetStore - walletTokensStore: TokensStore { + walletTokensStore: WalletStoreMocks.TokensStore { tokenGroupsModel: TokenGroupsModel {} } } diff --git a/storybook/stubs/AppLayouts/Wallet/stores/TokensStore.qml b/storybook/stubs/AppLayouts/Wallet/stores/TokensStore.qml index 96ab267bf02..4611af3533e 100644 --- a/storybook/stubs/AppLayouts/Wallet/stores/TokensStore.qml +++ b/storybook/stubs/AppLayouts/Wallet/stores/TokensStore.qml @@ -1,74 +1,3 @@ import QtQuick -import StatusQ.Core.Utils - -import QtModelsToolkit - -QtObject { - id: root - - property var tokenGroupsModel - property var tokenGroupsForChainModel - property var searchResultModel - property bool showCommunityAssetsInSend - property bool displayAssetsBelowBalance - property var getDisplayAssetsBelowBalanceThresholdDisplayAmount - property double tokenListUpdatedAt - - function buildGroupsForChain(chainId) { - if (!root.tokenGroupsModel || chainId <= 0) { - console.warn("buildGroupsForChain: invalid parameters", chainId) - return - } - - if (!root.tokenGroupsForChainModel) { - console.warn("buildGroupsForChain: tokenGroupsForChainModel is not set") - return - } - - root.tokenGroupsForChainModel.clear() - - for (let i = 0; i < root.tokenGroupsModel.ModelCount.count; i++) { - const group = ModelUtils.get(root.tokenGroupsModel, i) - - if (!group.tokens || group.tokens.ModelCount.count === 0) { - continue - } - - const tokensListModel = Qt.createQmlObject('import QtQuick; ListModel {}', root) - for (let j = 0; j < group.tokens.ModelCount.count; j++) { - const token = ModelUtils.get(group.tokens, j) - if (token.chainId === chainId) { - tokensListModel.append({ - key: token.key, - groupKey: token.groupKey, - crossChainId: token.crossChainId, - chainId: token.chainId, - address: token.address, - name: token.name, - symbol: token.symbol, - decimals: token.decimals, - image: token.image, - customToken: token.customToken, - communityId: token.communityId - }) - } - } - - if (tokensListModel.count > 0) { - root.tokenGroupsForChainModel.append({ - key: group.key, - symbol: group.symbol, - name: group.name, - decimals: group.decimals, - logoUri: group.logoUri, - tokens: tokensListModel, - communityId: group.communityId || "", - marketDetails: group.marketDetails || {}, - detailsLoading: group.detailsLoading || false, - marketDetailsLoading: group.marketDetailsLoading || false - }) - } - } - } -} +QtObject {} diff --git a/storybook/stubs/AppLayouts/Wallet/stores/WalletAssetsStore.qml b/storybook/stubs/AppLayouts/Wallet/stores/WalletAssetsStore.qml index fddd95b113c..573da809d6c 100644 --- a/storybook/stubs/AppLayouts/Wallet/stores/WalletAssetsStore.qml +++ b/storybook/stubs/AppLayouts/Wallet/stores/WalletAssetsStore.qml @@ -12,10 +12,13 @@ import utils import QtModelsToolkit import SortFilterProxyModel +import AppLayouts.Wallet.stores +import AppLayouts.Wallet.storesmocks as WalletStoreMocks + QtObject { id: root - property TokensStore walletTokensStore: TokensStore {} + property var walletTokensStore: WalletStoreMocks.TokensStore {} property var baseGroupedAccountAssetModel: BaseGroupedAccountsAssetsModel {} diff --git a/storybook/stubs/AppLayouts/Wallet/storesmocks/TokensStore.qml b/storybook/stubs/AppLayouts/Wallet/storesmocks/TokensStore.qml new file mode 100644 index 00000000000..8632489baf5 --- /dev/null +++ b/storybook/stubs/AppLayouts/Wallet/storesmocks/TokensStore.qml @@ -0,0 +1,80 @@ +import QtQuick + +import StatusQ.Core.Utils + +import QtModelsToolkit + +import AppLayouts.Wallet.stores + +TokensStore { + id: root + + property var tokenGroupsModel + property var tokenGroupsForChainModel + property var searchResultModel + property bool showCommunityAssetsInSend + property bool displayAssetsBelowBalance + property var _displayAssetsBelowBalanceThresholdDisplayAmountFunc: function() { return 0 } + property double tokenListUpdatedAt + + function getDisplayAssetsBelowBalanceThresholdDisplayAmount() { + return _displayAssetsBelowBalanceThresholdDisplayAmountFunc() + } + + function buildGroupsForChain(chainId) { + if (!root.tokenGroupsModel || chainId <= 0) { + console.warn("buildGroupsForChain: invalid parameters", chainId) + return + } + + if (!root.tokenGroupsForChainModel) { + console.warn("buildGroupsForChain: tokenGroupsForChainModel is not set") + return + } + + root.tokenGroupsForChainModel.clear() + + for (let i = 0; i < root.tokenGroupsModel.ModelCount.count; i++) { + const group = ModelUtils.get(root.tokenGroupsModel, i) + + if (!group.tokens || group.tokens.ModelCount.count === 0) { + continue + } + + const tokensListModel = Qt.createQmlObject('import QtQuick; ListModel {}', root) + for (let j = 0; j < group.tokens.ModelCount.count; j++) { + const token = ModelUtils.get(group.tokens, j) + if (token.chainId === chainId) { + tokensListModel.append({ + key: token.key, + groupKey: token.groupKey, + crossChainId: token.crossChainId, + chainId: token.chainId, + address: token.address, + name: token.name, + symbol: token.symbol, + decimals: token.decimals, + image: token.image, + customToken: token.customToken, + communityId: token.communityId + }) + } + } + + if (tokensListModel.count > 0) { + root.tokenGroupsForChainModel.append({ + key: group.key, + symbol: group.symbol, + name: group.name, + decimals: group.decimals, + logoUri: group.logoUri, + tokens: tokensListModel, + communityId: group.communityId || "", + marketDetails: group.marketDetails || {}, + detailsLoading: group.detailsLoading || false, + marketDetailsLoading: group.marketDetailsLoading || false + }) + } + } + } +} diff --git a/storybook/stubs/AppLayouts/Wallet/storesmocks/qmldir b/storybook/stubs/AppLayouts/Wallet/storesmocks/qmldir new file mode 100644 index 00000000000..6f0f6c0df00 --- /dev/null +++ b/storybook/stubs/AppLayouts/Wallet/storesmocks/qmldir @@ -0,0 +1 @@ +TokensStore 1.0 TokensStore.qml diff --git a/storybook/stubs/shared/stores/send/TransactionStore.qml b/storybook/stubs/shared/stores/send/TransactionStore.qml index d531d7b2123..eab6e0f2cee 100644 --- a/storybook/stubs/shared/stores/send/TransactionStore.qml +++ b/storybook/stubs/shared/stores/send/TransactionStore.qml @@ -8,6 +8,7 @@ import shared.stores import SortFilterProxyModel import AppLayouts.Wallet.stores +import AppLayouts.Wallet.storesmocks as WalletStoreMocks // TODO: This store, as all other stores should be empty QtObject {}. // All mocking should be done in place in Storybook pages and unit tests. @@ -24,7 +25,7 @@ QtObject { readonly property CurrenciesStore currencyStore: CurrenciesStore {} - readonly property TokensStore tokensStore: TokensStore {} + readonly property var tokensStore: WalletStoreMocks.TokensStore {} readonly property var accounts: WalletSendAccountsModel { Component.onCompleted: selectedSenderAccountAddress = accounts.get(0).address diff --git a/ui/app/AppLayouts/Chat/popups/PaymentRequestModal.qml b/ui/app/AppLayouts/Chat/popups/PaymentRequestModal.qml index 4f095fd73fe..17ca3e53f4c 100644 --- a/ui/app/AppLayouts/Chat/popups/PaymentRequestModal.qml +++ b/ui/app/AppLayouts/Chat/popups/PaymentRequestModal.qml @@ -46,11 +46,8 @@ StatusDialog { property int selectedNetworkChainId: Constants.chains.mainnetChainId property string selectedAccountAddress property string selectedTokenGroupKey: defaultTokenGroupKey - readonly property string selectedTokenKey: { - // selected token key is automatically evaluated based on the selected group key and selected chain - const token = SQUtils.ModelUtils.getByKey(d.selectedHolding.item.tokens, "chainId", root.selectedNetworkChainId) - return token.key - } + // selected token key is automatically evaluated based on the selected group key and selected chain + readonly property string selectedTokenKey: SQUtils.ModelUtils.getByKey(d.selectedHolding.item.tokens, "chainId", root.selectedNetworkChainId, "key") readonly property string symbol: d.selectedHolding.item.symbol diff --git a/ui/app/AppLayouts/Wallet/panels/SearchableAssetsPanel.qml b/ui/app/AppLayouts/Wallet/panels/SearchableAssetsPanel.qml index e80877e7f69..afce0aea650 100644 --- a/ui/app/AppLayouts/Wallet/panels/SearchableAssetsPanel.qml +++ b/ui/app/AppLayouts/Wallet/panels/SearchableAssetsPanel.qml @@ -21,6 +21,25 @@ import SortFilterProxyModel Control { id: root + /** + Expected model structure: + + key [string] - refers to token group key + name [string] - name + symbol [string] - symbol + decimals [int] - decimals + logoUri [string] - icon + currencyBalanceAsString [string] - formatted balance + sectionName (optional) [string] - text to be rendered as a section + balances [model] - contains a single entry for (token, accountAddress) pair + account [string] - wallet account address + groupKey [string] - group key that the token belongs to (cross chain id or token key if cross chain id is empty) + tokenKey [string] - token unique key (chain - address) + chainId [int] - token's chain id + tokenAddress [string] - token's address (contract) + balance [string] - raw balance that the `account` has for token with `tokenKey` + balanceAsString [string] - display value for balance that the `account` has for token with `tokenKey` + **/ property var model property string highlightedKey property string nonInteractiveKey diff --git a/ui/imports/shared/popups/send/SendModal.qml b/ui/imports/shared/popups/send/SendModal.qml index aeeeffa901a..b5759bd1e5a 100644 --- a/ui/imports/shared/popups/send/SendModal.qml +++ b/ui/imports/shared/popups/send/SendModal.qml @@ -167,7 +167,7 @@ StatusDialog { return } - let entry = SQUtils.ModelUtils.getByKey( + const entry = SQUtils.ModelUtils.getByKey( assetsAdaptor.outputAssetsModel, "key", d.selectedHolding.key) if(!entry){