fix(@desktop/tx): Fix tx modal
This commit is contained in:
parent
0c84f5e90f
commit
ebaa150082
|
@ -1 +1 @@
|
|||
Subproject commit 2040d0f8578e5adadeb9d291511d25a1eda79595
|
||||
Subproject commit eed0b83a2dce8a69e97fa3e16c72eb4460024835
|
|
@ -5,10 +5,10 @@ import QtQuick 2.13
|
|||
QtObject {
|
||||
id: root
|
||||
|
||||
property var dappBrowserAccount: walletModel.dappBrowserView.dappBrowserAccount
|
||||
property var accounts: walletModel.accountsView.accounts
|
||||
property string defaultCurrency: walletModel.balanceView.defaultCurrency
|
||||
property string signingPhrase: walletModel.utilsView.signingPhrase
|
||||
property var dappBrowserAccount: walletSectionAccounts.current
|
||||
property var accounts: walletSectionAccounts.model
|
||||
property string defaultCurrency: walletSection.currentCurrency
|
||||
property string signingPhrase: walletSection.signingPhrase
|
||||
property string etherscanString: walletModel.utilsView.etherscanLink
|
||||
|
||||
function setDappBrowserAddress() {
|
||||
|
|
|
@ -50,13 +50,15 @@ Item {
|
|||
return root.store.registerEnsGasEstimate(username, selectedAccount.address)
|
||||
}
|
||||
onSendTransaction: function(selectedAddress, gasLimit, gasPrice, tipLimit, overallLimit, password) {
|
||||
return root.store.registerEns(username,
|
||||
selectedAddress,
|
||||
gasLimit,
|
||||
tipLimit,
|
||||
overallLimit,
|
||||
gasPrice,
|
||||
password)
|
||||
return root.store.registerEns(
|
||||
username,
|
||||
selectedAddress,
|
||||
gasLimit,
|
||||
tipLimit,
|
||||
overallLimit,
|
||||
gasPrice,
|
||||
password
|
||||
)
|
||||
}
|
||||
onSuccess: function(){
|
||||
usernameRegistered(username);
|
||||
|
|
|
@ -84,9 +84,9 @@ ModalPopup {
|
|||
|
||||
StatusAccountSelector {
|
||||
id: selectFromAccount
|
||||
accounts: walletModel.accountsView.accounts
|
||||
accounts: walletSectionAccounts.model
|
||||
selectedAccount: {
|
||||
const currAcc = walletModel.accountsView.currentAccount
|
||||
const currAcc = walletSectionCurrent
|
||||
if (currAcc.walletType !== Constants.watchWalletType) {
|
||||
return currAcc
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ ModalPopup {
|
|||
RecipientSelector {
|
||||
id: selectRecipient
|
||||
visible: false
|
||||
accounts: walletModel.accountsView.accounts
|
||||
accounts: walletSectionAccounts.model
|
||||
contacts: profileModel.contacts.addedContacts
|
||||
selectedRecipient: { "address": utilsModel.ensRegisterAddress, "type": RecipientSelector.Type.Address }
|
||||
readOnly: true
|
||||
|
|
|
@ -75,7 +75,7 @@ ModalPopup {
|
|||
anchors.leftMargin: Style.current.padding
|
||||
anchors.rightMargin: Style.current.padding
|
||||
initialItem: group1
|
||||
isLastGroup: stack.currentGroup === group4
|
||||
isLastGroup: stack.currentGroup === group3
|
||||
onGroupActivated: {
|
||||
root.title = group.headerText
|
||||
btnNext.text = group.footerText
|
||||
|
@ -89,15 +89,15 @@ ModalPopup {
|
|||
showBackBtn: false
|
||||
StatusAccountSelector {
|
||||
id: selectFromAccount
|
||||
accounts: walletModel.accountsView.accounts
|
||||
accounts: walletSectionAccounts.model
|
||||
selectedAccount: {
|
||||
const currAcc = walletModel.accountsView.currentAccount
|
||||
const currAcc = walletSectionCurrent
|
||||
if (currAcc.walletType !== Constants.watchWalletType) {
|
||||
return currAcc
|
||||
}
|
||||
return null
|
||||
}
|
||||
currency: walletModel.balanceView.defaultCurrency
|
||||
currency: walletSection.currentCurrency
|
||||
width: stack.width
|
||||
//% "Choose account"
|
||||
label: qsTrId("choose-account")
|
||||
|
@ -108,7 +108,7 @@ ModalPopup {
|
|||
RecipientSelector {
|
||||
id: selectRecipient
|
||||
visible: false
|
||||
accounts: walletModel.accountsView.accounts
|
||||
accounts: walletSectionAccounts.model
|
||||
contacts: profileModel.contacts.addedContacts
|
||||
selectedRecipient: { "address": contractAddress, "type": RecipientSelector.Type.Address }
|
||||
readOnly: true
|
||||
|
@ -121,7 +121,7 @@ ModalPopup {
|
|||
gasPrice: parseFloat(walletModel.gasView.gasPrice)
|
||||
getGasEthValue: walletModel.gasView.getGasEthValue
|
||||
getFiatValue: walletModel.balanceView.getFiatValue
|
||||
defaultCurrency: walletModel.balanceView.defaultCurrency
|
||||
defaultCurrency: walletSection.currentCurrency
|
||||
width: stack.width
|
||||
|
||||
property var estimateGas: Backpressure.debounce(gasSelector, 600, function() {
|
||||
|
@ -140,7 +140,7 @@ ModalPopup {
|
|||
}
|
||||
}
|
||||
TransactionFormGroup {
|
||||
id: group3
|
||||
id: group2
|
||||
//% "Authorize %1 %2"
|
||||
headerText: qsTrId("authorize--1--2").arg(Utils.stripTrailingZeros(root.assetPrice)).arg(root.asset.symbol)
|
||||
//% "Sign with password"
|
||||
|
@ -157,7 +157,7 @@ ModalPopup {
|
|||
}
|
||||
toAccount: selectRecipient.selectedRecipient
|
||||
asset: root.asset
|
||||
currency: walletModel.balanceView.defaultCurrency
|
||||
currency: walletSection.currentCurrency
|
||||
amount: {
|
||||
const fiatValue = walletModel.balanceView.getFiatValue(root.assetPrice || 0, root.asset.symbol, currency)
|
||||
return { "value": root.assetPrice, "fiatValue": fiatValue }
|
||||
|
@ -165,7 +165,7 @@ ModalPopup {
|
|||
}
|
||||
}
|
||||
TransactionFormGroup {
|
||||
id: group4
|
||||
id: group3
|
||||
//% "Send %1 %2"
|
||||
headerText: qsTrId("send--1--2").arg(Utils.stripTrailingZeros(root.assetPrice)).arg(root.asset.symbol)
|
||||
//% "Sign with password"
|
||||
|
@ -191,7 +191,9 @@ ModalPopup {
|
|||
icon.height: 16
|
||||
icon.rotation: 180
|
||||
visible: stack.currentGroup.showBackBtn
|
||||
enabled: stack.currentGroup.isValid || stack.isLastGroup
|
||||
enabled: {
|
||||
stack.currentGroup.isValid || stack.isLastGroup
|
||||
}
|
||||
onClicked: {
|
||||
if (typeof stack.currentGroup.onBackClicked === "function") {
|
||||
return stack.currentGroup.onBackClicked()
|
||||
|
|
Loading…
Reference in New Issue