fix(@wallet): Show token modal
fixes #4621 the crash seemed to be caused by signal of signal. Simplifying the flow remove the need for this signal of signal
This commit is contained in:
parent
358e3c4a16
commit
1a255f5bcc
|
@ -17,7 +17,7 @@ Item {
|
|||
property var customTokenList
|
||||
signal toggleVisibleClicked(string symbol)
|
||||
signal removeCustomTokenTriggered(string address)
|
||||
signal tokenDetailsTriggered(string address, string name, string symbol, string decimals)
|
||||
signal showTokenDetailsTriggered(string address, string name, string symbol, string decimals)
|
||||
|
||||
SearchBox {
|
||||
id: searchBox
|
||||
|
@ -103,7 +103,7 @@ Item {
|
|||
//% "Token details"
|
||||
text: qsTrId("token-details")
|
||||
onTriggered: {
|
||||
modalBody.tokenDetailsTriggered(address, name, symbol, decimals);
|
||||
modalBody.showTokenDetailsTriggered(address, name, symbol, decimals);
|
||||
}
|
||||
}
|
||||
Action {
|
||||
|
|
|
@ -99,12 +99,6 @@ Item {
|
|||
onClosed: {
|
||||
destroy();
|
||||
}
|
||||
onAddCustomTokenTriggered: {
|
||||
addCustomTokenModal.openEditable();
|
||||
}
|
||||
onTokenDetailsTriggered: {
|
||||
addCustomTokenModal.openWithData(address, name, symbol, decimals);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -116,10 +110,6 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
AddCustomTokenModal{
|
||||
id: addCustomTokenModal
|
||||
}
|
||||
|
||||
Item {
|
||||
property int btnOuterMargin: Style.current.bigPadding
|
||||
id: walletMenu
|
||||
|
|
|
@ -14,9 +14,7 @@ ModalPopup {
|
|||
id: popup
|
||||
//% "Manage Assets"
|
||||
title: qsTrId("manage-assets")
|
||||
signal addCustomTokenTriggered()
|
||||
signal tokenDetailsTriggered(string address, string address, string address, string address)
|
||||
|
||||
|
||||
TokenSettingsModalContent {
|
||||
id: settingsModalContent
|
||||
anchors.left: parent.left
|
||||
|
@ -34,8 +32,12 @@ ModalPopup {
|
|||
onRemoveCustomTokenTriggered: {
|
||||
RootStore.removeCustomToken(address)
|
||||
}
|
||||
onTokenDetailsTriggered: {
|
||||
popup.tokenDetailsTriggered(address, name, symbol, decimals);
|
||||
onShowTokenDetailsTriggered: {
|
||||
addShowTokenModal.openWithData(address, name, symbol, decimals);
|
||||
}
|
||||
|
||||
AddShowTokenModal{
|
||||
id: addShowTokenModal
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +47,9 @@ ModalPopup {
|
|||
text: qsTrId("add-custom-token")
|
||||
anchors.top: parent.top
|
||||
onClicked: {
|
||||
popup.addCustomTokenTriggered();
|
||||
addShowTokenModal.openEditable();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue