feat(MintToken): Disable airdrop, remote destruct and burn options if mint status is failed
Airdrop, remote destruct and burn options disabled if token status failed.
This commit is contained in:
parent
5e4164e2e6
commit
9524ced598
|
@ -55,7 +55,7 @@ QtObject {
|
|||
tokenType: 2,
|
||||
name: "Kitty artwork",
|
||||
image: ModelsData.collectibles.kitty1Big,
|
||||
deployState: 2,
|
||||
deployState: 0,
|
||||
symbol: "KAT",
|
||||
description: "Desc",
|
||||
supply: 10,
|
||||
|
|
|
@ -83,7 +83,7 @@ SettingsPageLayout {
|
|||
property var tokenOwnersModel
|
||||
property var remotelyDestructTokensList
|
||||
property bool remotelyDestruct
|
||||
property bool burnEnabled
|
||||
property bool burnVisible
|
||||
property string tokenKey
|
||||
property int burnAmount
|
||||
property int remainingTokens
|
||||
|
@ -397,16 +397,20 @@ SettingsPageLayout {
|
|||
MintTokensFooterPanel {
|
||||
id: footerPanel
|
||||
|
||||
readonly property bool deployStateFailed : (!!d.currentToken) ? d.currentToken.deployState === Constants.ContractTransactionStatus.Failed : false
|
||||
|
||||
function closePopups() {
|
||||
remotelyDestructPopup.close()
|
||||
alertPopup.close()
|
||||
signTransactionPopup.close()
|
||||
}
|
||||
|
||||
airdropEnabled: true
|
||||
retailEnabled: false
|
||||
remotelySelfDestructVisible: d.remotelyDestruct
|
||||
burnVisible: d.burnEnabled
|
||||
airdropEnabled: !deployStateFailed
|
||||
remotelyDestructEnabled: !deployStateFailed
|
||||
burnEnabled: !deployStateFailed
|
||||
|
||||
remotelyDestructVisible: d.remotelyDestruct
|
||||
burnVisible: d.burnVisible
|
||||
|
||||
onAirdropClicked: d.airdropClicked()
|
||||
onRemotelyDestructClicked: remotelyDestructPopup.open()
|
||||
|
@ -589,7 +593,7 @@ SettingsPageLayout {
|
|||
|
||||
Binding {
|
||||
target: d
|
||||
property: "burnEnabled"
|
||||
property: "burnVisible"
|
||||
value: !view.infiniteSupply
|
||||
restoreMode: Binding.RestoreBindingOrValue
|
||||
}
|
||||
|
|
|
@ -13,7 +13,9 @@ Control {
|
|||
|
||||
property alias airdropEnabled: airdropButton.enabled
|
||||
property alias retailEnabled: retailButton.enabled
|
||||
property alias remotelySelfDestructVisible: remotelySelfDestructButton.visible
|
||||
property alias remotelyDestructEnabled: remotelyDestructButton.enabled
|
||||
property alias burnEnabled: burnButton.enabled
|
||||
property alias remotelyDestructVisible: remotelyDestructButton.visible
|
||||
property alias burnVisible: burnButton.visible
|
||||
|
||||
signal airdropClicked
|
||||
|
@ -55,7 +57,7 @@ Control {
|
|||
}
|
||||
|
||||
StatusFlatButton {
|
||||
id: remotelySelfDestructButton
|
||||
id: remotelyDestructButton
|
||||
|
||||
icon.name: "remotely-destruct"
|
||||
text: qsTr("Remotely destruct")
|
||||
|
|
Loading…
Reference in New Issue