From b6746c1c3d2298cff05f2685b5fed08ce4a49948 Mon Sep 17 00:00:00 2001 From: smk762 Date: Sat, 18 Sep 2021 17:32:02 +0800 Subject: [PATCH] Create isIDO function --- atomic_defi_design/qml/Constants/General.qml | 5 +++++ atomic_defi_design/qml/Portfolio/AssetsList.qml | 2 +- atomic_defi_design/qml/Portfolio/TableDex.qml | 2 +- atomic_defi_design/qml/Wallet/EnableCoinModal.qml | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/atomic_defi_design/qml/Constants/General.qml b/atomic_defi_design/qml/Constants/General.qml index 2978e9af0d..d70888d0f6 100644 --- a/atomic_defi_design/qml/Constants/General.qml +++ b/atomic_defi_design/qml/Constants/General.qml @@ -35,6 +35,11 @@ QtObject { } } + function isIDO(ticker) { + let IDO_chains = [] + return IDO_chains.includes(ticker) + } + // Returns the icon full path of a coin type. // If the given coin type has spaces, it will be replaced by '-' characters. // If the given coin type is empty, returns an empty string. diff --git a/atomic_defi_design/qml/Portfolio/AssetsList.qml b/atomic_defi_design/qml/Portfolio/AssetsList.qml index 7a91efdda4..564772fd46 100644 --- a/atomic_defi_design/qml/Portfolio/AssetsList.qml +++ b/atomic_defi_design/qml/Portfolio/AssetsList.qml @@ -147,7 +147,7 @@ Dex.DefaultListView Dex.DexLabel { - enabled: name === "Tokel" + enabled: Dex.General.isIDO(ticker) visible: enabled anchors.left: parent.right anchors.leftMargin: 5 diff --git a/atomic_defi_design/qml/Portfolio/TableDex.qml b/atomic_defi_design/qml/Portfolio/TableDex.qml index d2702c513d..0272e8b4e5 100644 --- a/atomic_defi_design/qml/Portfolio/TableDex.qml +++ b/atomic_defi_design/qml/Portfolio/TableDex.qml @@ -222,7 +222,7 @@ Item { DefaultText { - enabled: name === "Tokel" + enabled: General.isIDO(ticker) visible: enabled anchors.left: parent.right anchors.leftMargin: 5 diff --git a/atomic_defi_design/qml/Wallet/EnableCoinModal.qml b/atomic_defi_design/qml/Wallet/EnableCoinModal.qml index 21da86adba..b706dc875e 100644 --- a/atomic_defi_design/qml/Wallet/EnableCoinModal.qml +++ b/atomic_defi_design/qml/Wallet/EnableCoinModal.qml @@ -129,7 +129,7 @@ BasicModal { anchors.left: typeTag.right anchors.leftMargin: 3 anchors.verticalCenter: parent.verticalCenter - enabled: model.ticker === "TKL" + enabled: General.isIDO(ticker) visible: enabled type: "IDO" }