diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp index 74ab9c3d9..788baafd2 100644 --- a/src/qt/bitcoinunits.cpp +++ b/src/qt/bitcoinunits.cpp @@ -39,25 +39,53 @@ bool BitcoinUnits::valid(int unit) QString BitcoinUnits::name(int unit) { - switch(unit) + if(!TestNet() && !RegTest()) { - case DRK: return QString("DRK"); - case mDRK: return QString("mDRK"); - case uDRK: return QString::fromUtf8("μDRK"); - case duffs: return QString::fromUtf8("duffs"); - default: return QString("???"); + switch(unit) + { + case DRK: return QString("DRK"); + case mDRK: return QString("mDRK"); + case uDRK: return QString::fromUtf8("μDRK"); + case duffs: return QString::fromUtf8("duffs"); + default: return QString("???"); + } + } + else + { + switch(unit) + { + case DRK: return QString("tDRK"); + case mDRK: return QString("mtDRK"); + case uDRK: return QString::fromUtf8("μtDRK"); + case duffs: return QString::fromUtf8("tduffs"); + default: return QString("???"); + } } } QString BitcoinUnits::description(int unit) { - switch(unit) + if(!TestNet() && !RegTest()) { - case DRK: return QString("Darkcoins"); - case mDRK: return QString("Milli-Darkcoins (1 / 1,000)"); - case uDRK: return QString("Micro-Darkcoins (1 / 1,000,000)"); - case duffs: return QString("Ten Nano-Darkcoins (1 / 100,000,000)"); - default: return QString("???"); + switch(unit) + { + case DRK: return QString("Darkcoins"); + case mDRK: return QString("Milli-Darkcoins (1 / 1,000)"); + case uDRK: return QString("Micro-Darkcoins (1 / 1,000,000)"); + case duffs: return QString("Ten Nano-Darkcoins (1 / 100,000,000)"); + default: return QString("???"); + } + } + else + { + switch(unit) + { + case DRK: return QString("Testdarkcoins"); + case mDRK: return QString("Milli-Testdarkcoins (1 / 1,000)"); + case uDRK: return QString("Micro-Testdarkcoins (1 / 1,000,000)"); + case duffs: return QString("Ten Nano-Testdarkcoins (1 / 100,000,000)"); + default: return QString("???"); + } } } diff --git a/src/qt/bitcoinunits.h b/src/qt/bitcoinunits.h index 8546c3783..bb5eb9807 100644 --- a/src/qt/bitcoinunits.h +++ b/src/qt/bitcoinunits.h @@ -9,6 +9,8 @@ #include #include +#include "chainparams.h" + /** Darkcoin unit definitions. Encapsulates parsing and formatting and serves as list model for drop-down selection boxes. */