@@ -44,6 +44,7 @@ SendCoinsEntry::SendCoinsEntry(const PlatformStyle *_platformStyle, QWidget *par
4444 // Connect signals
4545 connect (ui->payAmount , &BitcoinAmountField::valueChanged, this , &SendCoinsEntry::payAmountChanged);
4646 connect (ui->checkboxSubtractFeeFromAmount , &QCheckBox::toggled, this , &SendCoinsEntry::subtractFeeFromAmountChanged);
47+ connect (ui->payAmount , SIGNAL (valueChanged ()), this , SLOT (payAmountChangedInternal ()));
4748 connect (ui->deleteButton , &QPushButton::clicked, this , &SendCoinsEntry::deleteClicked);
4849 connect (ui->deleteButton_is , &QPushButton::clicked, this , &SendCoinsEntry::deleteClicked);
4950 connect (ui->deleteButton_s , &QPushButton::clicked, this , &SendCoinsEntry::deleteClicked);
@@ -115,6 +116,17 @@ void SendCoinsEntry::clear()
115116 updateDisplayUnit ();
116117}
117118
119+ void SendCoinsEntry::payAmountChangedInternal ()
120+ {
121+ const auto send_assets = ui->payAmount ->fullValue ();
122+ if (send_assets.first == Params ().GetConsensus ().pegged_asset ) {
123+ ui->checkboxSubtractFeeFromAmount ->setEnabled (true );
124+ } else {
125+ ui->checkboxSubtractFeeFromAmount ->setCheckState (Qt::Unchecked);
126+ ui->checkboxSubtractFeeFromAmount ->setEnabled (false );
127+ }
128+ }
129+
118130void SendCoinsEntry::checkSubtractFeeFromAmount ()
119131{
120132 ui->checkboxSubtractFeeFromAmount ->setChecked (true );
0 commit comments