fix: fix double popup for estimating gas errors

This commit is contained in:
Jonathan Rainville 2021-01-20 12:05:07 -05:00 committed by Iuri Matias
parent 3a538acb1e
commit 21edea4a9a
2 changed files with 15 additions and 30 deletions

View File

@ -37,7 +37,7 @@ Item {
if (root.state === Constants.addressRequested) {
selectAccountModal.open()
} else if (root.state === Constants.transactionRequested) {
signTransactionModal.open()
openPopup(signTxComponent)
}
}
}
@ -85,21 +85,14 @@ Item {
}
}
Loader {
id: signTransactionModal
function open() {
this.active = true
this.item.open()
}
function closed() {
this.active = false // kill an opened instance
}
sourceComponent: SignTransactionModal {
Component {
id: signTxComponent
SignTransactionModal {
onOpened: {
walletModel.getGasPricePredictions()
}
onClosed: {
signTransactionModal.closed()
destroy();
}
selectedAccount: {}
selectedRecipient: {

View File

@ -31,32 +31,24 @@ Item {
onClicked: {
walletModel.setFocusedAccountByAddress(commandParametersObject.fromAddress)
var acc = walletModel.focusedAccount
signTransactionModal.selectedAccount = {
name: acc.name,
address: commandParametersObject.fromAddress,
iconColor: acc.iconColor,
assets: acc.assets
}
signTransactionModal.open()
openPopup(signTxComponent, {selectedAccount: {
name: acc.name,
address: commandParametersObject.fromAddress,
iconColor: acc.iconColor,
assets: acc.assets
}})
}
}
}
Loader {
id: signTransactionModal
function open() {
this.active = true
this.item.open()
}
function closed() {
this.active = false // kill an opened instance
}
sourceComponent: SignTransactionModal {
Component {
id: signTxComponent
SignTransactionModal {
onOpened: {
walletModel.getGasPricePredictions()
}
onClosed: {
signTransactionModal.closed()
destroy();
}
selectedRecipient: {
return {