@@ -457,17 +457,17 @@ fn command_create_lending_market(
457
457
) ;
458
458
459
459
let recent_blockhash = config. rpc_client . get_latest_blockhash ( ) ?;
460
+ transaction. sign (
461
+ & vec ! [ config. fee_payer. as_ref( ) , & lending_market_keypair] ,
462
+ recent_blockhash,
463
+ ) ;
460
464
check_fee_payer_balance (
461
465
config,
462
466
lending_market_balance
463
467
+ config
464
468
. rpc_client
465
469
. get_fee_for_message ( transaction. message ( ) ) ?,
466
470
) ?;
467
- transaction. sign (
468
- & vec ! [ config. fee_payer. as_ref( ) , & lending_market_keypair] ,
469
- recent_blockhash,
470
- ) ;
471
471
send_transaction ( config, transaction) ?;
472
472
Ok ( ( ) )
473
473
}
@@ -644,19 +644,6 @@ fn command_add_reserve(
644
644
) ;
645
645
646
646
let recent_blockhash = config. rpc_client . get_latest_blockhash ( ) ?;
647
- check_fee_payer_balance (
648
- config,
649
- total_balance
650
- + config
651
- . rpc_client
652
- . get_fee_for_message ( transaction_1. message ( ) ) ?
653
- + config
654
- . rpc_client
655
- . get_fee_for_message ( transaction_2. message ( ) ) ?
656
- + config
657
- . rpc_client
658
- . get_fee_for_message ( transaction_3. message ( ) ) ?,
659
- ) ?;
660
647
transaction_1. sign (
661
648
& vec ! [
662
649
config. fee_payer. as_ref( ) ,
@@ -684,6 +671,19 @@ fn command_add_reserve(
684
671
] ,
685
672
recent_blockhash,
686
673
) ;
674
+ check_fee_payer_balance (
675
+ config,
676
+ total_balance
677
+ + config
678
+ . rpc_client
679
+ . get_fee_for_message ( transaction_1. message ( ) ) ?
680
+ + config
681
+ . rpc_client
682
+ . get_fee_for_message ( transaction_2. message ( ) ) ?
683
+ + config
684
+ . rpc_client
685
+ . get_fee_for_message ( transaction_3. message ( ) ) ?,
686
+ ) ?;
687
687
send_transaction ( config, transaction_1) ?;
688
688
send_transaction ( config, transaction_2) ?;
689
689
send_transaction ( config, transaction_3) ?;
0 commit comments