@ -109,7 +109,6 @@ SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *p
ui - > groupFee - > setId ( ui - > radioCustomFee , 1 ) ;
ui - > groupFee - > setId ( ui - > radioCustomFee , 1 ) ;
ui - > groupFee - > button ( ( int ) std : : max ( 0 , std : : min ( 1 , settings . value ( " nFeeRadio " ) . toInt ( ) ) ) ) - > setChecked ( true ) ;
ui - > groupFee - > button ( ( int ) std : : max ( 0 , std : : min ( 1 , settings . value ( " nFeeRadio " ) . toInt ( ) ) ) ) - > setChecked ( true ) ;
ui - > groupCustomFee - > setId ( ui - > radioCustomPerKilobyte , 0 ) ;
ui - > groupCustomFee - > setId ( ui - > radioCustomPerKilobyte , 0 ) ;
ui - > groupCustomFee - > setId ( ui - > radioCustomAtLeast , 1 ) ;
ui - > groupCustomFee - > button ( ( int ) std : : max ( 0 , std : : min ( 1 , settings . value ( " nCustomFeeRadio " ) . toInt ( ) ) ) ) - > setChecked ( true ) ;
ui - > groupCustomFee - > button ( ( int ) std : : max ( 0 , std : : min ( 1 , settings . value ( " nCustomFeeRadio " ) . toInt ( ) ) ) ) - > setChecked ( true ) ;
ui - > customFee - > setValue ( settings . value ( " nTransactionFee " ) . toLongLong ( ) ) ;
ui - > customFee - > setValue ( settings . value ( " nTransactionFee " ) . toLongLong ( ) ) ;
ui - > checkBoxMinimumFee - > setChecked ( settings . value ( " fPayOnlyMinFee " ) . toBool ( ) ) ;
ui - > checkBoxMinimumFee - > setChecked ( settings . value ( " fPayOnlyMinFee " ) . toBool ( ) ) ;
@ -606,7 +605,6 @@ void SendCoinsDialog::updateFeeSectionControls()
ui - > checkBoxMinimumFee - > setEnabled ( ui - > radioCustomFee - > isChecked ( ) ) ;
ui - > checkBoxMinimumFee - > setEnabled ( ui - > radioCustomFee - > isChecked ( ) ) ;
ui - > labelMinFeeWarning - > setEnabled ( ui - > radioCustomFee - > isChecked ( ) ) ;
ui - > labelMinFeeWarning - > setEnabled ( ui - > radioCustomFee - > isChecked ( ) ) ;
ui - > radioCustomPerKilobyte - > setEnabled ( ui - > radioCustomFee - > isChecked ( ) & & ! ui - > checkBoxMinimumFee - > isChecked ( ) ) ;
ui - > radioCustomPerKilobyte - > setEnabled ( ui - > radioCustomFee - > isChecked ( ) & & ! ui - > checkBoxMinimumFee - > isChecked ( ) ) ;
ui - > radioCustomAtLeast - > setEnabled ( ui - > radioCustomFee - > isChecked ( ) & & ! ui - > checkBoxMinimumFee - > isChecked ( ) & & CoinControlDialog : : coinControl - > HasSelected ( ) ) ;
ui - > customFee - > setEnabled ( ui - > radioCustomFee - > isChecked ( ) & & ! ui - > checkBoxMinimumFee - > isChecked ( ) ) ;
ui - > customFee - > setEnabled ( ui - > radioCustomFee - > isChecked ( ) & & ! ui - > checkBoxMinimumFee - > isChecked ( ) ) ;
}
}
@ -617,19 +615,12 @@ void SendCoinsDialog::updateGlobalFeeVariables()
int nConfirmTarget = ui - > sliderSmartFee - > maximum ( ) - ui - > sliderSmartFee - > value ( ) + 2 ;
int nConfirmTarget = ui - > sliderSmartFee - > maximum ( ) - ui - > sliderSmartFee - > value ( ) + 2 ;
payTxFee = CFeeRate ( 0 ) ;
payTxFee = CFeeRate ( 0 ) ;
// set nMinimumTotalFee to 0 to not accidentally pay a custom fee
CoinControlDialog : : coinControl - > nMinimumTotalFee = 0 ;
// show the estimated required time for confirmation
// show the estimated required time for confirmation
ui - > confirmationTargetLabel - > setText ( GUIUtil : : formatDurationStr ( nConfirmTarget * Params ( ) . GetConsensus ( ) . nPowTargetSpacing ) + " / " + tr ( " %n block(s) " , " " , nConfirmTarget ) ) ;
ui - > confirmationTargetLabel - > setText ( GUIUtil : : formatDurationStr ( nConfirmTarget * Params ( ) . GetConsensus ( ) . nPowTargetSpacing ) + " / " + tr ( " %n block(s) " , " " , nConfirmTarget ) ) ;
}
}
else
else
{
{
payTxFee = CFeeRate ( ui - > customFee - > value ( ) ) ;
payTxFee = CFeeRate ( ui - > customFee - > value ( ) ) ;
// if user has selected to set a minimum absolute fee, pass the value to coincontrol
// set nMinimumTotalFee to 0 in case of user has selected that the fee is per KB
CoinControlDialog : : coinControl - > nMinimumTotalFee = ui - > radioCustomAtLeast - > isChecked ( ) ? ui - > customFee - > value ( ) : 0 ;
}
}
}
}
@ -828,21 +819,6 @@ void SendCoinsDialog::coinControlUpdateLabels()
if ( ! model | | ! model - > getOptionsModel ( ) )
if ( ! model | | ! model - > getOptionsModel ( ) )
return ;
return ;
if ( model - > getOptionsModel ( ) - > getCoinControlFeatures ( ) )
{
// enable minimum absolute fee UI controls
ui - > radioCustomAtLeast - > setVisible ( true ) ;
// only enable the feature if inputs are selected
ui - > radioCustomAtLeast - > setEnabled ( ui - > radioCustomFee - > isChecked ( ) & & ! ui - > checkBoxMinimumFee - > isChecked ( ) & & CoinControlDialog : : coinControl - > HasSelected ( ) ) ;
}
else
{
// in case coin control is disabled (=default), hide minimum absolute fee UI controls
ui - > radioCustomAtLeast - > setVisible ( false ) ;
return ;
}
// set pay amounts
// set pay amounts
CoinControlDialog : : payAmounts . clear ( ) ;
CoinControlDialog : : payAmounts . clear ( ) ;
CoinControlDialog : : fSubtractFeeFromAmount = false ;
CoinControlDialog : : fSubtractFeeFromAmount = false ;