Merge #16497: gui: Generate bech32 addresses by default (take 2, fixup)
fa5a4cd813gui: Generate bech32 addresses by default (take 2, fixup) (MarcoFalke) Pull request description: This commit was missing from my previous pull request for some reason 🤔 : * gui: Generate bech32 addresses by default #15711 ACKs for top commit: jonasschnelli: Tested ACKfa5a4cd813promag: ACKfa5a4cd813. fanquake: ACKfa5a4cd813Tree-SHA512: 4a38df929d7704bf08e50a2e814b2e6cd25c4165d040a84287045b44e32f4708750845520d64170ea58e41de3ca496da4625d3eb375f9528b21b364c22068a6b
This commit is contained in:
3 files changed
+14
-3
No files matched your search
@@ -7,6 +7,7 @@
|
||||
#include <qt/receivecoinsdialog.h>
|
||||
#include <qt/forms/ui_receivecoinsdialog.h>
|
||||
|
||||
#include <interfaces/node.h>
|
||||
#include <qt/addresstablemodel.h>
|
||||
#include <qt/optionsmodel.h>
|
||||
#include <qt/platformstyle.h>
|
||||
@@ -92,10 +93,16 @@ void ReceiveCoinsDialog::setModel(WalletModel *_model)
|
||||
// Last 2 columns are set by the columnResizingFixer, when the table geometry is ready.
|
||||
columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(tableView, AMOUNT_MINIMUM_COLUMN_WIDTH, DATE_COLUMN_WIDTH, this);
|
||||
|
||||
if (model->wallet().getDefaultAddressType() == OutputType::BECH32) {
|
||||
ui->useLegacyAddress->setCheckState(Qt::Unchecked);
|
||||
if (model->node().isAddressTypeSet()) {
|
||||
// user explicitly set the type, use it
|
||||
if (model->wallet().getDefaultAddressType() == OutputType::BECH32) {
|
||||
ui->useLegacyAddress->setCheckState(Qt::Unchecked);
|
||||
} else {
|
||||
ui->useLegacyAddress->setCheckState(Qt::Checked);
|
||||
}
|
||||
} else {
|
||||
ui->useLegacyAddress->setCheckState(Qt::Checked);
|
||||
// Always fall back to bech32 in the gui
|
||||
ui->useLegacyAddress->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
|
||||
// Set the button to be enabled or disabled based on whether the wallet can give out new addresses.
|
||||
|
||||
Reference in new issue
Block a user