mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Merge pull request #92 from vertoe/devel-0.9
Update darkcoin units to tDRK if TestNet().
This commit is contained in:
commit
c1269e7850
@ -38,6 +38,8 @@ bool BitcoinUnits::valid(int unit)
|
||||
}
|
||||
|
||||
QString BitcoinUnits::name(int unit)
|
||||
{
|
||||
if(!TestNet() && !RegTest())
|
||||
{
|
||||
switch(unit)
|
||||
{
|
||||
@ -48,8 +50,22 @@ QString BitcoinUnits::name(int unit)
|
||||
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)
|
||||
{
|
||||
if(!TestNet() && !RegTest())
|
||||
{
|
||||
switch(unit)
|
||||
{
|
||||
@ -60,6 +76,18 @@ QString BitcoinUnits::description(int unit)
|
||||
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("???");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
qint64 BitcoinUnits::factor(int unit)
|
||||
{
|
||||
|
@ -9,6 +9,8 @@
|
||||
#include <QAbstractListModel>
|
||||
#include <QString>
|
||||
|
||||
#include "chainparams.h"
|
||||
|
||||
/** Darkcoin unit definitions. Encapsulates parsing and formatting
|
||||
and serves as list model for drop-down selection boxes.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user