Refactor address lookups
This commit is contained in:
@@ -1082,7 +1082,7 @@ void MainWindow::setupBalancesTab() {
|
||||
fnDoSendFrom(addr);
|
||||
});
|
||||
|
||||
if (addr.startsWith("t")) {
|
||||
if (Settings::isTAddress(addr)) {
|
||||
auto defaultSapling = rpc->getDefaultSaplingAddress();
|
||||
if (!defaultSapling.isEmpty()) {
|
||||
menu.addAction(tr("Shield balance to Sapling"), [=] () {
|
||||
@@ -1402,7 +1402,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 (Settings::isTAddress(addr) && ui->listRecieveAddresses->findText(addr) < 0) {
|
||||
auto bal = rpc->getAllBalances()->value(addr);
|
||||
ui->listRecieveAddresses->addItem(addr, bal);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user