Custom fees

This commit is contained in:
Aditya Kulkarni
2018-11-13 21:58:50 -08:00
parent 99cf9db1e3
commit 448b2ceca8
5 changed files with 40 additions and 23 deletions

View File

@@ -109,14 +109,18 @@ QString Settings::getUSDFormat(double bal) {
return QString();
}
QString Settings::getZECDisplayFormat(double bal) {
// This is idiotic. Why doesn't QString have a way to do this?
QString f = QString::number(bal, 'f', 8);
QString Settings::getDecimalString(double amt) {
QString f = QString::number(amt, 'f', 8);
while (f.contains(".") && (f.right(1) == "0" || f.right(1) == ".")) {
f = f.left(f.length() - 1);
}
return f % " " % Settings::getTokenName();
return f;
}
QString Settings::getZECDisplayFormat(double bal) {
// This is idiotic. Why doesn't QString have a way to do this?
return getDecimalString(bal) % " " % Settings::getTokenName();
}
QString Settings::getZECUSDDisplayFormat(double bal) {