mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-22 04:21:44 +00:00
fix(MintToken): Footer options must be disabled in some cases
- Footer options must be disabled until minting process is completed. - Airdrop footer option must be disabled if not available tokens to airdrop. - Remotely destruct footer option must be disabled if no hodlers. Fixes #11198
This commit is contained in:
parent
6edfa002d2
commit
9b5efd59ef
@ -94,7 +94,7 @@ SettingsPageLayout {
|
||||
property var tokenOwnersModel
|
||||
property var remotelyDestructTokensList
|
||||
property bool remotelyDestruct
|
||||
property bool burnVisible
|
||||
property bool infiniteSupply
|
||||
property string tokenKey
|
||||
property int burnAmount
|
||||
property int remainingTokens
|
||||
@ -413,7 +413,7 @@ SettingsPageLayout {
|
||||
MintTokensFooterPanel {
|
||||
id: footerPanel
|
||||
|
||||
readonly property bool deployStateFailed : (!!d.currentToken) ? d.currentToken.deployState === Constants.ContractTransactionStatus.Failed : false
|
||||
readonly property bool deployStateCompleted : (!!d.currentToken) ? d.currentToken.deployState === Constants.ContractTransactionStatus.Completed : false
|
||||
|
||||
function closePopups() {
|
||||
remotelyDestructPopup.close()
|
||||
@ -422,12 +422,12 @@ SettingsPageLayout {
|
||||
burnTokensPopup.close()
|
||||
}
|
||||
|
||||
airdropEnabled: !deployStateFailed
|
||||
remotelyDestructEnabled: !deployStateFailed
|
||||
burnEnabled: !deployStateFailed
|
||||
airdropEnabled: deployStateCompleted && (d.infiniteSupply || d.remainingTokens != 0)
|
||||
remotelyDestructEnabled: deployStateCompleted && (d.tokenOwnersModel && d.tokenOwnersModel.count > 0)
|
||||
burnEnabled: deployStateCompleted
|
||||
|
||||
remotelyDestructVisible: d.remotelyDestruct
|
||||
burnVisible: d.burnVisible
|
||||
burnVisible: !d.infiniteSupply
|
||||
|
||||
onAirdropClicked: d.airdropClicked()
|
||||
onRemotelyDestructClicked: remotelyDestructPopup.open()
|
||||
@ -610,8 +610,8 @@ SettingsPageLayout {
|
||||
|
||||
Binding {
|
||||
target: d
|
||||
property: "burnVisible"
|
||||
value: !view.infiniteSupply
|
||||
property: "infiniteSupply"
|
||||
value: view.infiniteSupply
|
||||
restoreMode: Binding.RestoreBindingOrValue
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user