Parse addresses properly
This commit is contained in:
@@ -239,12 +239,18 @@ void MainWindow::turnstileDoMigration(QString fromAddr) {
|
|||||||
|
|
||||||
auto fnUpdateSproutBalance = [=] (QString addr) {
|
auto fnUpdateSproutBalance = [=] (QString addr) {
|
||||||
double bal = 0;
|
double bal = 0;
|
||||||
|
|
||||||
|
// The currentText contains the balance as well, so strip that.
|
||||||
|
if (addr.contains("(")) {
|
||||||
|
addr = addr.left(addr.indexOf("("));
|
||||||
|
}
|
||||||
|
|
||||||
if (addr.startsWith("All")) {
|
if (addr.startsWith("All")) {
|
||||||
bal = fnGetAllSproutBalance();
|
bal = fnGetAllSproutBalance();
|
||||||
} else {
|
} else {
|
||||||
bal = rpc->getAllBalances()->value(addr);
|
bal = rpc->getAllBalances()->value(addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto balTxt = Settings::getZECUSDDisplayFormat(bal);
|
auto balTxt = Settings::getZECUSDDisplayFormat(bal);
|
||||||
|
|
||||||
if (bal < Turnstile::minMigrationAmount) {
|
if (bal < Turnstile::minMigrationAmount) {
|
||||||
|
|||||||
Reference in New Issue
Block a user