fix(CommunityTokenView): Hide holdings list when token not deployed

Closes: #11386
This commit is contained in:
Michał Cieślak 2023-07-03 16:56:25 +02:00 committed by Michał
parent 235c3d778b
commit 2d0aaaa974
1 changed files with 6 additions and 4 deletions

View File

@ -21,7 +21,7 @@ StatusScrollView {
property bool preview: false
// https://bugreports.qt.io/browse/QTBUG-84269
/* readonly */ property TokenObject token
/* required */ property TokenObject token
readonly property bool isAssetView: token.type === Constants.TokenType.ERC20
@ -44,6 +44,9 @@ StatusScrollView {
readonly property string chainIcon: token.chainIcon
readonly property int decimals: token.decimals
readonly property bool deploymentCompleted:
deployState === Constants.ContractTransactionStatus.Completed
// Models:
property var tokenOwnersModel
@ -83,8 +86,7 @@ StatusScrollView {
spacing: Style.current.padding
RowLayout {
visible: !root.preview && ((root.deployState === Constants.ContractTransactionStatus.InProgress) ||
(root.deployState === Constants.ContractTransactionStatus.Failed))
visible: !root.preview && !root.deploymentCompleted
spacing: Style.current.halfPadding
StatusDotsLoadingIndicator { visible: (root.deployState === Constants.ContractTransactionStatus.InProgress) }
@ -338,7 +340,7 @@ StatusScrollView {
}
SortableTokenHoldersPanel {
visible: !root.preview
visible: !root.preview && root.deploymentCompleted
model: root.tokenOwnersModel
tokenName: root.name