fix(Mint): No redirect to Tokens screen when minting a token

Fixes #11731
This commit is contained in:
Noelia 2023-08-02 14:01:10 +02:00 committed by Noelia
parent d8c9802d77
commit 33c9771d3b
1 changed files with 53 additions and 64 deletions

View File

@ -94,8 +94,7 @@ StackView {
resetNavigation() resetNavigation()
if(root.isAdminOnly) { if(root.isAdminOnly) {
// Admins can only see the initial tokens page. They cannot mint // Admins can only see the initial tokens page. They cannot mint. Initial view.
root.push(mintedTokensViewComponent, StackView.Immediate)
return return
} }
@ -107,8 +106,7 @@ StackView {
} }
if(root.ownerOrTMasterTokenItemsExist) { if(root.ownerOrTMasterTokenItemsExist) {
// Owner and TMaster tokens deployment action has been started at least ones but still without success // Owner and TMaster tokens deployment action has been started at least ones but still without success. Initial view.
root.push(mintedTokensViewComponent, StackView.Immediate)
return return
} }
@ -117,9 +115,6 @@ StackView {
root.push(ownerTokenViewComponent, StackView.Immediate) root.push(ownerTokenViewComponent, StackView.Immediate)
return return
} }
// Any other case, initial view
root.push(mintedTokensViewComponent, StackView.Immediate)
} }
QtObject { QtObject {
@ -140,19 +135,7 @@ StackView {
} }
initialItem: mintedTokensViewComponent initialItem: SettingsPage {
Component {
id: tokenObjectComponent
TokenObject {}
}
// Mint tokens possible view contents:
Component {
id: mintedTokensViewComponent
SettingsPage {
implicitWidth: 0 implicitWidth: 0
title: qsTr("Tokens") title: qsTr("Tokens")
@ -203,8 +186,14 @@ StackView {
onRetryOwnerTokenClicked: d.retryPrivilegedToken(tokenKey, chainId, accountName, accountAddress) onRetryOwnerTokenClicked: d.retryPrivilegedToken(tokenKey, chainId, accountName, accountAddress)
} }
} }
Component {
id: tokenObjectComponent
TokenObject {}
} }
// Mint tokens possible view contents:
Component { Component {
id: ownerTokenViewComponent id: ownerTokenViewComponent