From ef632765502367870d0d1b51d31230a3e7eacbc0 Mon Sep 17 00:00:00 2001 From: Cryptoforge Date: Sat, 17 Jun 2023 18:59:13 -0700 Subject: [PATCH] fix kmd merge for qt --- src/qt/komodo.cpp | 2 +- src/qt/overviewpage.cpp | 2 +- src/qt/walletmodel.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qt/komodo.cpp b/src/qt/komodo.cpp index 616c85e7a..bbb037ef2 100644 --- a/src/qt/komodo.cpp +++ b/src/qt/komodo.cpp @@ -358,7 +358,7 @@ void KomodoCore::shutdown() while (!fShutdown) { - if ( ASSETCHAINS_SYMBOL[0] == 0 ) + if (chainName.isKMD()) { //if (!ShutdownRequested()) komodo_passport_iteration(); // if ( KOMODO_NSPV_FULLNODE ) diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index af789ad38..8f6d6ea9c 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -388,7 +388,7 @@ void OverviewPage::setBalance(const CAmount& balance, const CAmount& unconfirmed // for the non-mining users bool showImmature = immatureBalance != 0; bool showWatchOnlyImmature = watchImmatureBalance != 0; - bool showInterest = (ASSETCHAINS_SYMBOL[0] == 0); + bool showInterest = (chainName.isKMD()); bool showTransparent = balance !=0; bool showWatchOnlyTransaparent = watchOnlyBalance != 0; diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 99b8819d4..76974fb31 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -130,7 +130,7 @@ CAmount WalletModel::getPrivateWatchBalance() const CAmount WalletModel::getInterestBalance() const { - return (ASSETCHAINS_SYMBOL[0] == 0) ? komodo_interestsum() : 0; + return (chainName.isKMD()) ? komodo_interestsum() : 0; } bool WalletModel::haveWatchOnly() const @@ -391,7 +391,7 @@ void WalletModel::checkBalanceChanged() CAmount newWatchImmatureBalance = 0; CAmount newWatchPrivateBalance = 0; CAmount newprivateBalance = getBalanceZaddr("", 1, true); - CAmount newinterestBalance = (ASSETCHAINS_SYMBOL[0] == 0) ? komodo_interestsum() : 0; + CAmount newinterestBalance = (chainName.isKMD()) ? komodo_interestsum() : 0; if (haveWatchOnly()) { newWatchOnlyBalance = getWatchBalance(); @@ -690,7 +690,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareZTransaction(WalletModelZTransa if ( fromSprout || toSprout ) return SproutUsageExpired; } - if ( toSapling && ASSETCHAINS_SYMBOL[0] == 0 ) + if ( toSapling && chainName.isKMD() ) return SproutUsageWillExpireSoon; // If we are sending from a shielded address, all recipient