Add suport for CNY,RUB,CAD,SGD,CHF,INR,GBP,AUD
This commit is contained in:
@@ -89,6 +89,22 @@ QString RecurringPaymentInfo::getAmountPretty() const {
|
||||
return currency == "EUR" ? amount.toDecimalEURString() : amount.toDecimalhushString();
|
||||
} else if (Settings::getInstance()->get_currency_name() == "BTC") {
|
||||
return currency == "BTC" ? amount.toDecimalBTCString() : amount.toDecimalhushString();
|
||||
} else if (Settings::getInstance()->get_currency_name() == "CNY") {
|
||||
return currency == "EUR" ? amount.toDecimalCNYString() : amount.toDecimalhushString();
|
||||
} else if (Settings::getInstance()->get_currency_name() == "RUB") {
|
||||
return currency == "BTC" ? amount.toDecimalRUBString() : amount.toDecimalhushString();
|
||||
} else if (Settings::getInstance()->get_currency_name() == "CAD") {
|
||||
return currency == "EUR" ? amount.toDecimalCADString() : amount.toDecimalhushString();
|
||||
} else if (Settings::getInstance()->get_currency_name() == "SGD") {
|
||||
return currency == "BTC" ? amount.toDecimalSGDString() : amount.toDecimalhushString();
|
||||
} else if (Settings::getInstance()->get_currency_name() == "CHF") {
|
||||
return currency == "EUR" ? amount.toDecimalCHFString() : amount.toDecimalhushString();
|
||||
} else if (Settings::getInstance()->get_currency_name() == "INR") {
|
||||
return currency == "BTC" ? amount.toDecimalINRString() : amount.toDecimalhushString();
|
||||
} else if (Settings::getInstance()->get_currency_name() == "GBP") {
|
||||
return currency == "EUR" ? amount.toDecimalGBPString() : amount.toDecimalhushString();
|
||||
} else if (Settings::getInstance()->get_currency_name() == "AUD") {
|
||||
return currency == "BTC" ? amount.toDecimalAUDString() : amount.toDecimalhushString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,6 +165,23 @@ RecurringPaymentInfo* Recurring::getNewRecurringFromTx(QWidget* parent, MainWind
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalEURString());
|
||||
} else if (Settings::getInstance()->get_currency_name() == "BTC") {
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalBTCString());
|
||||
} else if (Settings::getInstance()->get_currency_name() == "CNY") {
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalCNYString());
|
||||
} else if (Settings::getInstance()->get_currency_name() == "RUB") {
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalRUBString());
|
||||
} else if (Settings::getInstance()->get_currency_name() == "CAD") {
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalCADString());
|
||||
} else if (Settings::getInstance()->get_currency_name() == "SGD") {
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalSGDString());
|
||||
} else if (Settings::getInstance()->get_currency_name() == "CHF") {
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalCHFString());
|
||||
} else if (Settings::getInstance()->get_currency_name() == "INR") {
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalINRString());
|
||||
} else if (Settings::getInstance()->get_currency_name() == "GBP") {
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalGBPString());
|
||||
} else if (Settings::getInstance()->get_currency_name() == "AUD") {
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalAUDString());
|
||||
|
||||
}
|
||||
|
||||
ui.txtMemo->setPlainText(tx.toAddrs[0].memo);
|
||||
@@ -167,6 +200,26 @@ RecurringPaymentInfo* Recurring::getNewRecurringFromTx(QWidget* parent, MainWind
|
||||
} else if
|
||||
(c == "BTC") {
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalBTCString());
|
||||
} else if (c == "CNY") {
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalCNYString());
|
||||
} else if
|
||||
(c == "RUB") {
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalRUBString());
|
||||
} else if (c == "CAD") {
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalCADString());
|
||||
} else if
|
||||
(c == "SGD") {
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalSGDString());
|
||||
} else if (c == "CHF") {
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalCHFString());
|
||||
} else if
|
||||
(c == "INR") {
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalINRString());
|
||||
} else if (c == "GBP") {
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalGBPString());
|
||||
} else if
|
||||
(c == "AUD") {
|
||||
ui.lblAmt->setText(tx.toAddrs[0].amount.toDecimalAUDString());
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user