refactor(AccountSelector): use built-in onSelectedAccountChanged event
As per comment: https://github.com/status-im/nim-status-client/pull/703#discussion_r467879840
This commit is contained in:
parent
477f5aa460
commit
246b90b5ae
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue