@@ -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 ( ) {
@@ -888,6 +885,8 @@ pub trait RpcApi: Sized {
888
885
replaceable : Option < bool > ,
889
886
confirmation_target : Option < u32 > ,
890
887
estimate_mode : Option < json:: EstimateMode > ,
888
+ avoid_reuse : Option < bool > ,
889
+ fee_rate : Option < i32 > ,
891
890
) -> Result < bitcoin:: Txid > {
892
891
let mut args = [
893
892
address. to_string ( ) . into ( ) ,
@@ -898,12 +897,14 @@ pub trait RpcApi: Sized {
898
897
opt_into_json ( replaceable) ?,
899
898
opt_into_json ( confirmation_target) ?,
900
899
opt_into_json ( estimate_mode) ?,
900
+ opt_into_json ( avoid_reuse) ?,
901
+ opt_into_json ( fee_rate) ?,
901
902
] ;
902
903
self . call (
903
904
"sendtoaddress" ,
904
905
handle_defaults (
905
906
& mut args,
906
- & [ "" . into ( ) , "" . into ( ) , false . into ( ) , false . into ( ) , 6 . into ( ) , null ( ) ] ,
907
+ & [ "" . into ( ) , "" . into ( ) , false . into ( ) , false . into ( ) , null ( ) , null ( ) , null ( ) , null ( ) ] ,
907
908
) ,
908
909
)
909
910
}
0 commit comments