@@ -121,9 +121,6 @@ fn handle_defaults<'a, 'b>(
121121 let defaults_i = defaults. len ( ) - 1 - i;
122122 if args[ args_i] == serde_json:: Value :: Null {
123123 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- }
127124 args[ args_i] = defaults[ defaults_i] . clone ( ) ;
128125 }
129126 } else if first_non_null_optional_idx. is_none ( ) {
@@ -900,6 +897,8 @@ pub trait RpcApi: Sized {
900897 replaceable : Option < bool > ,
901898 confirmation_target : Option < u32 > ,
902899 estimate_mode : Option < json:: EstimateMode > ,
900+ avoid_reuse : Option < bool > ,
901+ fee_rate : Option < i32 > ,
903902 ) -> Result < bitcoin:: Txid > {
904903 let mut args = [
905904 address. to_string ( ) . into ( ) ,
@@ -910,12 +909,14 @@ pub trait RpcApi: Sized {
910909 opt_into_json ( replaceable) ?,
911910 opt_into_json ( confirmation_target) ?,
912911 opt_into_json ( estimate_mode) ?,
912+ opt_into_json ( avoid_reuse) ?,
913+ opt_into_json ( fee_rate) ?,
913914 ] ;
914915 self . call (
915916 "sendtoaddress" ,
916917 handle_defaults (
917918 & mut args,
918- & [ "" . into ( ) , "" . into ( ) , false . into ( ) , false . into ( ) , 6 . into ( ) , null ( ) ] ,
919+ & [ "" . into ( ) , "" . into ( ) , false . into ( ) , false . into ( ) , null ( ) , null ( ) , null ( ) , null ( ) ] ,
919920 ) ,
920921 )
921922 }
0 commit comments