fix(Airdrop): Airdrop item not inserted correctly

- After a rebase, signal properties were modified incorrectly.

- Also added protection to not push into the stack the same state more than ones and reset holdings model each time it is set.

Fixes #11147
This commit is contained in:
Noelia 2023-06-21 18:40:26 +02:00 committed by Noelia
parent 25b4f1a269
commit 6edfa002d2
3 changed files with 7 additions and 2 deletions

View File

@ -81,7 +81,10 @@ SettingsPageLayout {
}
]
onPrimaryHeaderButtonClicked: stackManager.push(d.newAirdropViewState, newAirdropView, null, StackView.Immediate)
onPrimaryHeaderButtonClicked: {
if(root.state !== d.newAirdropViewState)
stackManager.push(d.newAirdropViewState, newAirdropView, null, StackView.Immediate)
}
StackViewStates {
id: stackManager

View File

@ -54,7 +54,7 @@ SettingsPageLayout {
signal burnToken(string tokenKey, int amount)
signal airdropToken(string tokenKey)
signal airdropToken(string tokenKey, int type, var addresses)
signal deleteToken(string tokenKey)

View File

@ -79,6 +79,8 @@ StatusScrollView {
signal navigateToMintTokenSettings(bool isAssetType)
function selectToken(key, amount, type) {
if(selectedHoldingsModel)
selectedHoldingsModel.clear()
var tokenModel = null
if(type === Constants.TokenType.ERC20)
tokenModel = root.assetsModel