@@ -184,6 +184,8 @@ function getSendManyJSON(sendPageState: SendPageState): [] {
184
184
}
185
185
} )
186
186
) ;
187
+ json . push ( 1 ) ; // minconf = 1
188
+ json . push ( Utils . getDefaultFee ( ) ) ; // Control the default fee as well.
187
189
188
190
console . log ( 'Sending:' ) ;
189
191
console . log ( json ) ;
@@ -229,7 +231,9 @@ const ConfirmModalInternal = ({
229
231
openErrorModal,
230
232
history
231
233
} ) => {
232
- const sendingTotal = sendPageState . toaddrs . reduce ( ( s , t ) => parseFloat ( s ) + parseFloat ( t . amount ) , 0.0 ) + 0.0001 ;
234
+ const sendingTotal =
235
+ sendPageState . toaddrs . reduce ( ( s , t ) => parseFloat ( s ) + parseFloat ( t . amount ) , 0.0 ) +
236
+ Utils . getDefaultFee ( info . latestBlock ) ;
233
237
const { bigPart, smallPart } = Utils . splitZecAmountIntoBigSmall ( sendingTotal ) ;
234
238
235
239
const sendButton = ( ) => {
@@ -301,7 +305,10 @@ const ConfirmModalInternal = ({
301
305
) ) }
302
306
</ div >
303
307
304
- < ConfirmModalToAddr toaddr = { { to : 'Fee' , amount : 0.0001 , memo : null } } info = { info } />
308
+ < ConfirmModalToAddr
309
+ toaddr = { { to : 'Fee' , amount : Utils . getDefaultFee ( info . latestBlock ) , memo : null } }
310
+ info = { info }
311
+ />
305
312
306
313
{ info && info . disconnected && (
307
314
< div className = { [ cstyles . red , cstyles . margintoplarge ] . join ( ' ' ) } >
@@ -443,7 +450,7 @@ export default class Send extends PureComponent<Props, SendState> {
443
450
} ;
444
451
445
452
setMaxAmount = ( id : number , total : number ) => {
446
- const { sendPageState, setSendPageState } = this . props ;
453
+ const { sendPageState, setSendPageState, info } = this . props ;
447
454
448
455
const newToAddrs = sendPageState . toaddrs . slice ( 0 ) ;
449
456
@@ -452,7 +459,7 @@ export default class Send extends PureComponent<Props, SendState> {
452
459
. reduce ( ( s , a ) => parseFloat ( s ) + parseFloat ( a . amount ) , 0 ) ;
453
460
454
461
// Add Fee
455
- totalOtherAmount += Utils . getDefaultFee ( ) ;
462
+ totalOtherAmount += Utils . getDefaultFee ( info . latestBlock ) ;
456
463
457
464
// Find the correct toAddr
458
465
const toAddr = newToAddrs . find ( a => a . id === id ) ;
0 commit comments