fix(@settings): fix Gas selector for snt

fixes #5572
This commit is contained in:
Anthony Laibe 2022-04-19 13:13:57 +02:00 committed by Anthony Laibe
parent bda2114209
commit 5e05a7613c
8 changed files with 25 additions and 3 deletions

View File

@ -22,6 +22,7 @@ import ../transaction/service as transaction_service
import ../network/service as network_service
import ../token/service as token_service
import ../eth/dto/coder
import ../eth/dto/transaction
logScope:

View File

@ -1,2 +1,3 @@
StickerData 1.0 StickerData.qml
StickerPackData 1.0 StickerPackData.qml
StickersStore 1.0 StickersStore.qml

View File

@ -66,6 +66,7 @@ StatusAppTwoPanelLayout {
id: ensContainer
ensUsernamesStore: profileView.store.ensUsernamesStore
contactsStore: profileView.store.contactsStore
stickersStore: profileView.store.stickersStore
profileContentWidth: _internal.profileContentWidth
}

View File

@ -152,5 +152,13 @@ QtObject {
return ""
return ensUsernamesModule.getStatusToken()
}
function isEIP1559Enabled() {
return walletSection.isEIP1559Enabled()
}
function suggestedFees() {
return JSON.parse(walletSectionTransactions.suggestedFees())
}
}

View File

@ -1,6 +1,8 @@
import QtQuick 2.13
import utils 1.0
import AppLayouts.Chat.stores 1.0
QtObject {
id: root
@ -53,6 +55,10 @@ QtObject {
property WalletStore walletStore: WalletStore {
}
property var stickersModuleInst: stickersModule
property var stickersStore: StickersStore {
stickersModule: stickersModuleInst
}
property bool browserMenuItemEnabled: localAccountSensitiveSettings.isBrowserEnabled
property bool walletMenuItemEnabled: localAccountSensitiveSettings.isWalletEnabled

View File

@ -17,6 +17,7 @@ Item {
property var ensUsernamesStore
property var contactsStore
property var stickersStore
property string username: ""
signal backBtnClicked();
@ -47,6 +48,8 @@ Item {
sourceComponent: StatusSNTTransactionModal {
store: root.ensUsernamesStore
contactsStore: root.contactsStore
stickersStore: root.stickersStore
asyncGasEstimateTarget: root.stickersStore.stickersModule
assetPrice: "10"
contractAddress: root.ensUsernamesStore.getEnsRegisteredAddress()
estimateGasFunction: function(selectedAccount, uuid) {

View File

@ -14,6 +14,7 @@ Item {
property EnsUsernamesStore ensUsernamesStore
property var contactsStore
property var stickersStore
property int profileContentWidth
property bool showSearchScreen: false
@ -245,6 +246,7 @@ Item {
EnsTermsAndConditionsView {
ensUsernamesStore: ensView.ensUsernamesStore
contactsStore: ensView.contactsStore
stickersStore: ensView.stickersStore
username: selectedUsername
onBackBtnClicked: back();
onUsernameRegistered: done(userName);

View File

@ -120,8 +120,8 @@ ModalPopup {
getGasEthValue: root.ensUsernamesStore.getGasEthValue
getFiatValue: root.ensUsernamesStore.getFiatValue
defaultCurrency: root.ensUsernamesStore.getCurrentCurrency()
isEIP1559Enabled: root.store.isEIP1559Enabled()
suggestedFees: root.store.suggestedFees()
isEIP1559Enabled: root.ensUsernamesStore.isEIP1559Enabled()
suggestedFees: root.ensUsernamesStore.suggestedFees()
property var estimateGas: Backpressure.debounce(gasSelector, 600, function() {
let estimatedGas = root.estimateGasFunction(selectFromAccount.selectedAccount);
@ -217,7 +217,7 @@ ModalPopup {
return root.sendTransaction()
}
if(gasSelector.isEIP1559Enabled && stack.currentGroup === group2 && gasSelector.advancedMode){
if(gasSelector.isEIP1559Enabled && stack.currentGroup === group3 && gasSelector.advancedMode){
if(gasSelector.showPriceLimitWarning || gasSelector.showTipLimitWarning){
Global.openPopup(transactionSettingsConfirmationPopupComponent, {
currentBaseFee: gasSelector.suggestedFees.baseFee,