diff options
Diffstat (limited to 'src/qt/bitcoinunits.cpp')
-rw-r--r-- | src/qt/bitcoinunits.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp index 1f9792a112..30625f419a 100644 --- a/src/qt/bitcoinunits.cpp +++ b/src/qt/bitcoinunits.cpp @@ -20,6 +20,7 @@ QList<BitcoinUnits::Unit> BitcoinUnits::availableUnits() unitlist.append(BTC); unitlist.append(mBTC); unitlist.append(uBTC); + unitlist.append(SAT); return unitlist; } @@ -30,6 +31,7 @@ bool BitcoinUnits::valid(int unit) case BTC: case mBTC: case uBTC: + case SAT: return true; default: return false; @@ -43,6 +45,7 @@ QString BitcoinUnits::longName(int unit) case BTC: return QString("BTC"); case mBTC: return QString("mBTC"); case uBTC: return QString::fromUtf8("µBTC (bits)"); + case SAT: return QString("Satoshi (sat)"); default: return QString("???"); } } @@ -52,7 +55,8 @@ QString BitcoinUnits::shortName(int unit) switch(unit) { case uBTC: return QString::fromUtf8("bits"); - default: return longName(unit); + case SAT: return QString("sat"); + default: return longName(unit); } } @@ -63,6 +67,7 @@ QString BitcoinUnits::description(int unit) case BTC: return QString("Bitcoins"); case mBTC: return QString("Milli-Bitcoins (1 / 1" THIN_SP_UTF8 "000)"); case uBTC: return QString("Micro-Bitcoins (bits) (1 / 1" THIN_SP_UTF8 "000" THIN_SP_UTF8 "000)"); + case SAT: return QString("Satoshi (sat) (1 / 100" THIN_SP_UTF8 "000" THIN_SP_UTF8 "000)"); default: return QString("???"); } } @@ -71,10 +76,11 @@ qint64 BitcoinUnits::factor(int unit) { switch(unit) { - case BTC: return 100000000; + case BTC: return 100000000; case mBTC: return 100000; case uBTC: return 100; - default: return 100000000; + case SAT: return 1; + default: return 100000000; } } @@ -85,6 +91,7 @@ int BitcoinUnits::decimals(int unit) case BTC: return 8; case mBTC: return 5; case uBTC: return 2; + case SAT: return 0; default: return 0; } } |