fix: fix double popup for estimating gas errors
This commit is contained in:
parent
3a538acb1e
commit
21edea4a9a
|
@ -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: {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue