Browse Source

Fix more instances of transparent address prefix assumptions

pull/45/head
Jonathan "Duke" Leto 5 years ago
parent
commit
fbb3c006cd
  1. 4
      src/mainwindow.cpp
  2. 2
      src/sendtab.cpp

4
src/mainwindow.cpp

@ -1080,7 +1080,7 @@ void MainWindow::setupBalancesTab() {
fnDoSendFrom(addr);
});
if (addr.startsWith("t")) {
if (addr.startsWith("R")) {
auto defaultSapling = rpc->getDefaultSaplingAddress();
if (!defaultSapling.isEmpty()) {
menu.addAction(tr("Shield balance to Sapling"), [=] () {
@ -1399,7 +1399,7 @@ void MainWindow::updateTAddrCombo(bool checked) {
std::for_each(utxos->begin(), utxos->end(), [=](auto& utxo) {
auto addr = utxo.address;
if (addr.startsWith("t") && ui->listRecieveAddresses->findText(addr) < 0) {
if (addr.startsWith("R") && ui->listRecieveAddresses->findText(addr) < 0) {
auto bal = rpc->getAllBalances()->value(addr);
ui->listRecieveAddresses->addItem(addr, bal);
}

2
src/sendtab.cpp

@ -155,7 +155,7 @@ void MainWindow::setDefaultPayFrom() {
if (maxZ >= 0) {
ui->inputsCombo->setCurrentIndex(maxZ);
} else {
auto maxT = findMax("t");
auto maxT = findMax("R");
maxT = maxT >= 0 ? maxT : 0;
ui->inputsCombo->setCurrentIndex(maxT);
}

Loading…
Cancel
Save