@@ -121,9 +121,6 @@ fn handle_defaults<'a, 'b>(
121
121
let defaults_i = defaults. len ( ) - 1 - i;
122
122
if args[ args_i] == serde_json:: Value :: Null {
123
123
if first_non_null_optional_idx. is_some ( ) {
124
- if defaults[ defaults_i] == serde_json:: Value :: Null {
125
- panic ! ( "Missing `default` for argument idx {}" , args_i) ;
126
- }
127
124
args[ args_i] = defaults[ defaults_i] . clone ( ) ;
128
125
}
129
126
} else if first_non_null_optional_idx. is_none ( ) {
@@ -900,6 +897,8 @@ pub trait RpcApi: Sized {
900
897
replaceable : Option < bool > ,
901
898
confirmation_target : Option < u32 > ,
902
899
estimate_mode : Option < json:: EstimateMode > ,
900
+ avoid_reuse : Option < bool > ,
901
+ fee_rate : Option < i32 > ,
903
902
) -> Result < bitcoin:: Txid > {
904
903
let mut args = [
905
904
address. to_string ( ) . into ( ) ,
@@ -910,12 +909,14 @@ pub trait RpcApi: Sized {
910
909
opt_into_json ( replaceable) ?,
911
910
opt_into_json ( confirmation_target) ?,
912
911
opt_into_json ( estimate_mode) ?,
912
+ opt_into_json ( avoid_reuse) ?,
913
+ opt_into_json ( fee_rate) ?,
913
914
] ;
914
915
self . call (
915
916
"sendtoaddress" ,
916
917
handle_defaults (
917
918
& mut args,
918
- & [ "" . into ( ) , "" . into ( ) , false . into ( ) , false . into ( ) , 6 . into ( ) , null ( ) ] ,
919
+ & [ "" . into ( ) , "" . into ( ) , false . into ( ) , false . into ( ) , null ( ) , null ( ) , null ( ) , null ( ) ] ,
919
920
) ,
920
921
)
921
922
}
0 commit comments