@@ -94,14 +94,11 @@ void ReceiveCoinsDialog::setModel(WalletModel *_model)
94
94
// Last 2 columns are set by the columnResizingFixer, when the table geometry is ready.
95
95
columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer (tableView, AMOUNT_MINIMUM_COLUMN_WIDTH, DATE_COLUMN_WIDTH, this );
96
96
97
- // configure bech32 checkbox, disable if launched with legacy as default:
98
97
if (model->wallet ().getDefaultAddressType () == OutputType::BECH32) {
99
98
ui->useBech32 ->setCheckState (Qt::Checked);
100
99
} else {
101
100
ui->useBech32 ->setCheckState (Qt::Unchecked);
102
101
}
103
-
104
- ui->useBech32 ->setVisible (model->wallet ().getDefaultAddressType () != OutputType::LEGACY);
105
102
}
106
103
}
107
104
@@ -144,9 +141,14 @@ void ReceiveCoinsDialog::on_receiveButton_clicked()
144
141
QString address;
145
142
QString label = ui->reqLabel ->text ();
146
143
/* Generate new receiving address */
147
- OutputType address_type = model->wallet ().getDefaultAddressType ();
148
- if (address_type != OutputType::LEGACY) {
149
- address_type = ui->useBech32 ->isChecked () ? OutputType::BECH32 : OutputType::P2SH_SEGWIT;
144
+ OutputType address_type;
145
+ if (ui->useBech32 ->isChecked ()) {
146
+ address_type = OutputType::BECH32;
147
+ } else {
148
+ address_type = model->wallet ().getDefaultAddressType ();
149
+ if (address_type == OutputType::BECH32) {
150
+ address_type = OutputType::P2SH_SEGWIT;
151
+ }
150
152
}
151
153
address = model->getAddressTableModel ()->addRow (AddressTableModel::Receive, label, " " , address_type);
152
154
SendCoinsRecipient info (address, label,
0 commit comments