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:
Anthony Laibe 2022-01-31 12:23:06 +01:00 committed by Sale Djenic
parent 358e3c4a16
commit 1a255f5bcc
4 changed files with 12 additions and 18 deletions

View File

@ -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 {

View File

@ -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

View File

@ -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();
}
}
}