|
|
@ -94,14 +94,11 @@ void ReceiveCoinsDialog::setModel(WalletModel *_model) |
|
|
|
// Last 2 columns are set by the columnResizingFixer, when the table geometry is ready.
|
|
|
|
// 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); |
|
|
|
columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(tableView, AMOUNT_MINIMUM_COLUMN_WIDTH, DATE_COLUMN_WIDTH, this); |
|
|
|
|
|
|
|
|
|
|
|
// configure bech32 checkbox, disable if launched with legacy as default:
|
|
|
|
|
|
|
|
if (model->getDefaultAddressType() == OUTPUT_TYPE_BECH32) { |
|
|
|
if (model->getDefaultAddressType() == OUTPUT_TYPE_BECH32) { |
|
|
|
ui->useBech32->setCheckState(Qt::Checked); |
|
|
|
ui->useBech32->setCheckState(Qt::Checked); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
ui->useBech32->setCheckState(Qt::Unchecked); |
|
|
|
ui->useBech32->setCheckState(Qt::Unchecked); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ui->useBech32->setVisible(model->getDefaultAddressType() != OUTPUT_TYPE_LEGACY); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -144,9 +141,14 @@ void ReceiveCoinsDialog::on_receiveButton_clicked() |
|
|
|
QString address; |
|
|
|
QString address; |
|
|
|
QString label = ui->reqLabel->text(); |
|
|
|
QString label = ui->reqLabel->text(); |
|
|
|
/* Generate new receiving address */ |
|
|
|
/* Generate new receiving address */ |
|
|
|
OutputType address_type = model->getDefaultAddressType(); |
|
|
|
OutputType address_type; |
|
|
|
if (address_type != OUTPUT_TYPE_LEGACY) { |
|
|
|
if (ui->useBech32->isChecked()) { |
|
|
|
address_type = ui->useBech32->isChecked() ? OUTPUT_TYPE_BECH32 : OUTPUT_TYPE_P2SH_SEGWIT; |
|
|
|
address_type = OUTPUT_TYPE_BECH32; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
address_type = model->getDefaultAddressType(); |
|
|
|
|
|
|
|
if (address_type == OUTPUT_TYPE_BECH32) { |
|
|
|
|
|
|
|
address_type = OUTPUT_TYPE_P2SH_SEGWIT; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
address = model->getAddressTableModel()->addRow(AddressTableModel::Receive, label, "", address_type); |
|
|
|
address = model->getAddressTableModel()->addRow(AddressTableModel::Receive, label, "", address_type); |
|
|
|
SendCoinsRecipient info(address, label, |
|
|
|
SendCoinsRecipient info(address, label, |
|
|
|