@@ -473,7 +473,7 @@ fn command_transfer(
473
473
sender : Pubkey ,
474
474
ui_amount : Option < f64 > ,
475
475
recipient : Pubkey ,
476
- allow_empty_recipient : bool ,
476
+ allow_unfunded_recipient : bool ,
477
477
fund_recipient : bool ,
478
478
mint_address : Option < Pubkey > ,
479
479
mint_decimals : Option < u8 > ,
@@ -524,9 +524,9 @@ fn command_transfer(
524
524
. value
525
525
. map ( |account_data| account_data. owner ) ;
526
526
527
- if recipient_account_owner. is_none ( ) && !allow_empty_recipient {
528
- return Err ( "Error: The recipient has no balance . \
529
- Add `--allow-empty -recipient` to complete the transfer \
527
+ if recipient_account_owner. is_none ( ) && !allow_unfunded_recipient {
528
+ return Err ( "Error: The recipient address is not funded . \
529
+ Add `--allow-unfunded -recipient` to complete the transfer \
530
530
"
531
531
. into ( ) ) ;
532
532
}
@@ -1412,11 +1412,17 @@ fn main() {
1412
1412
Otherwise assume the recipient address is a user wallet and transfer to \
1413
1413
the associated token account")
1414
1414
)
1415
+ . arg (
1416
+ Arg :: with_name ( "allow_unfunded_recipient" )
1417
+ . long ( "allow-unfunded-recipient" )
1418
+ . takes_value ( false )
1419
+ . help ( "Complete the transfer even if the recipient address is not funded" )
1420
+ )
1415
1421
. arg (
1416
1422
Arg :: with_name ( "allow_empty_recipient" )
1417
1423
. long ( "allow-empty-recipient" )
1418
1424
. takes_value ( false )
1419
- . help ( "Complete the transfer even if the recipient account does not exist" )
1425
+ . hidden ( true ) // Deprecated, use --allow-unfunded- recipient instead
1420
1426
)
1421
1427
. arg (
1422
1428
Arg :: with_name ( "fund_recipient" )
@@ -1944,13 +1950,14 @@ fn main() {
1944
1950
pubkey_of_signer ( arg_matches, MINT_ADDRESS_ARG . name , & mut wallet_manager) . unwrap ( ) ;
1945
1951
let mint_decimals = value_of :: < u8 > ( & arg_matches, MINT_DECIMALS_ARG . name ) ;
1946
1952
let fund_recipient = matches. is_present ( "fund_recipient" ) ;
1947
- let allow_empty_recipient = matches. is_present ( "allow_empty_recipient" ) ;
1953
+ let allow_unfunded_recipient = matches. is_present ( "allow_empty_recipient" )
1954
+ || matches. is_present ( "allow_unfunded_recipient" ) ;
1948
1955
command_transfer (
1949
1956
& config,
1950
1957
sender,
1951
1958
amount,
1952
1959
recipient,
1953
- allow_empty_recipient ,
1960
+ allow_unfunded_recipient ,
1954
1961
fund_recipient,
1955
1962
mint_address,
1956
1963
mint_decimals,
0 commit comments