gui: Generate bech32 addresses by default
This commit is contained in:
parent
00ca24b68f
commit
faf62d9415
2 changed files with 7 additions and 7 deletions
|
@ -189,7 +189,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="useBech32">
|
<widget class="QCheckBox" name="useLegacyAddress">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -206,10 +206,10 @@
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Native segwit addresses (aka Bech32 or BIP-173) reduce your transaction fees later on and offer better protection against typos, but old wallets don't support them. When unchecked, an address compatible with older wallets will be created instead.</string>
|
<string>Native segwit addresses (aka Bech32 or BIP-173) reduce your transaction fees later on and offer better protection against typos, but old wallets don't support them. When checked, an address compatible with older wallets will be created instead.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Generate native segwit (Bech32) address</string>
|
<string>Generate legacy address</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -360,7 +360,7 @@
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>reqLabel</tabstop>
|
<tabstop>reqLabel</tabstop>
|
||||||
<tabstop>reqAmount</tabstop>
|
<tabstop>reqAmount</tabstop>
|
||||||
<tabstop>useBech32</tabstop>
|
<tabstop>useLegacyAddress</tabstop>
|
||||||
<tabstop>reqMessage</tabstop>
|
<tabstop>reqMessage</tabstop>
|
||||||
<tabstop>receiveButton</tabstop>
|
<tabstop>receiveButton</tabstop>
|
||||||
<tabstop>clearButton</tabstop>
|
<tabstop>clearButton</tabstop>
|
||||||
|
|
|
@ -95,9 +95,9 @@ void ReceiveCoinsDialog::setModel(WalletModel *_model)
|
||||||
columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(tableView, AMOUNT_MINIMUM_COLUMN_WIDTH, DATE_COLUMN_WIDTH, this);
|
columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(tableView, AMOUNT_MINIMUM_COLUMN_WIDTH, DATE_COLUMN_WIDTH, this);
|
||||||
|
|
||||||
if (model->wallet().getDefaultAddressType() == OutputType::BECH32) {
|
if (model->wallet().getDefaultAddressType() == OutputType::BECH32) {
|
||||||
ui->useBech32->setCheckState(Qt::Checked);
|
ui->useLegacyAddress->setCheckState(Qt::Unchecked);
|
||||||
} else {
|
} else {
|
||||||
ui->useBech32->setCheckState(Qt::Unchecked);
|
ui->useLegacyAddress->setCheckState(Qt::Checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the button to be enabled or disabled based on whether the wallet can give out new addresses.
|
// Set the button to be enabled or disabled based on whether the wallet can give out new addresses.
|
||||||
|
@ -150,7 +150,7 @@ void ReceiveCoinsDialog::on_receiveButton_clicked()
|
||||||
QString label = ui->reqLabel->text();
|
QString label = ui->reqLabel->text();
|
||||||
/* Generate new receiving address */
|
/* Generate new receiving address */
|
||||||
OutputType address_type;
|
OutputType address_type;
|
||||||
if (ui->useBech32->isChecked()) {
|
if (!ui->useLegacyAddress->isChecked()) {
|
||||||
address_type = OutputType::BECH32;
|
address_type = OutputType::BECH32;
|
||||||
} else {
|
} else {
|
||||||
address_type = model->wallet().getDefaultAddressType();
|
address_type = model->wallet().getDefaultAddressType();
|
||||||
|
|
Loading…
Reference in a new issue