From 246b90b5aeb9618782facf1ed952fc4e6e37024f Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Mon, 10 Aug 2020 20:44:42 +0200 Subject: [PATCH] refactor(AccountSelector): use built-in onSelectedAccountChanged event As per comment: https://github.com/status-im/nim-status-client/pull/703#discussion_r467879840 --- ui/app/AppLayouts/Wallet/components/SendModalContent.qml | 4 ++-- ui/shared/AccountSelector.qml | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ui/app/AppLayouts/Wallet/components/SendModalContent.qml b/ui/app/AppLayouts/Wallet/components/SendModalContent.qml index bb53e7653e..078065a7f9 100644 --- a/ui/app/AppLayouts/Wallet/components/SendModalContent.qml +++ b/ui/app/AppLayouts/Wallet/components/SendModalContent.qml @@ -109,8 +109,8 @@ Item { anchors.topMargin: Style.current.padding anchors.left: parent.left anchors.right: parent.right - onAccountSelected: function (selectedAccount, index) { - txtAmount.selectedAccount = selectedAccount + onSelectedAccountChanged: { + txtAmount.selectedAccount = selectFromAccount.selectedAccount } } diff --git a/ui/shared/AccountSelector.qml b/ui/shared/AccountSelector.qml index 2d2d1bb4c3..9c8a36ab67 100644 --- a/ui/shared/AccountSelector.qml +++ b/ui/shared/AccountSelector.qml @@ -17,7 +17,6 @@ Item { // NOTE: if this asset is not selected as a wallet token in the UI, then // nothing will be displayed property string showAssetBalance: "" - signal accountSelected(var selectedAccount, int index) Repeater { visible: showAssetBalance !== "" @@ -208,7 +207,6 @@ Item { anchors.fill: itemContainer onClicked: { root.selectedAccount = { address, name, iconColor, assets, fiatBalance } - root.accountSelected(root.selectedAccount, index) select.menu.close() } }