@@ -7708,21 +7708,24 @@ pub mod args {
77087708 ctx : & mut Context ,
77097709 ) -> Result < Tx < SdkTypes > , Self :: Error > {
77107710 let ctx = ctx. borrow_mut_chain_or_exit ( ) ;
7711+ let wrapper = self . wrap_tx . map ( |wrapper| Wrapper {
7712+ broadcast_only : wrapper. broadcast_only ,
7713+ fee_amount : wrapper. fee_amount ,
7714+ fee_token : ctx. get ( & wrapper. fee_token ) . into ( ) ,
7715+ gas_limit : wrapper. gas_limit ,
7716+ wrapper_fee_payer : wrapper
7717+ . wrapper_fee_payer
7718+ . map ( |x| ctx. get ( & x) ) ,
7719+ } ) ;
77117720
77127721 Ok ( Tx :: < SdkTypes > {
77137722 dry_run : self . dry_run ,
7714- dry_run_wrapper : self . dry_run_wrapper ,
77157723 dump_tx : self . dump_tx ,
7716- dump_wrapper_tx : self . dump_wrapper_tx ,
77177724 output_folder : self . output_folder ,
77187725 force : self . force ,
7719- broadcast_only : self . broadcast_only ,
77207726 ledger_address : ctx. get ( & self . ledger_address ) ,
77217727 initialized_account_alias : self . initialized_account_alias ,
77227728 wallet_alias_force : self . wallet_alias_force ,
7723- fee_amount : self . fee_amount ,
7724- fee_token : ctx. get ( & self . fee_token ) . into ( ) ,
7725- gas_limit : self . gas_limit ,
77267729 signing_keys : self
77277730 . signing_keys
77287731 . iter ( )
@@ -7734,7 +7737,7 @@ pub mod args {
77347737 chain_id : self
77357738 . chain_id
77367739 . or_else ( || Some ( ctx. config . ledger . chain_id . clone ( ) ) ) ,
7737- wrapper_fee_payer : self . wrapper_fee_payer . map ( |x| ctx . get ( & x ) ) ,
7740+ wrap_tx : wrapper ,
77387741 memo : self . memo ,
77397742 use_device : self . use_device ,
77407743 device_transport : self . device_transport ,
@@ -7861,10 +7864,20 @@ pub mod args {
78617864 }
78627865
78637866 fn parse ( matches : & ArgMatches ) -> Self {
7864- let dry_run = DRY_RUN_TX . parse ( matches) ;
7865- let dry_run_wrapper = DRY_RUN_WRAPPER_TX . parse ( matches) ;
7866- let dump_tx = DUMP_TX . parse ( matches) ;
7867- let dump_wrapper_tx = DUMP_WRAPPER_TX . parse ( matches) ;
7867+ let dry_run = if DRY_RUN_TX . parse ( matches) {
7868+ Some ( DryRun :: Inner )
7869+ } else if DRY_RUN_WRAPPER_TX . parse ( matches) {
7870+ Some ( DryRun :: Wrapper )
7871+ } else {
7872+ None
7873+ } ;
7874+ let dump_tx = if DUMP_TX . parse ( matches) {
7875+ Some ( DumpTx :: Inner )
7876+ } else if DUMP_WRAPPER_TX . parse ( matches) {
7877+ Some ( DumpTx :: Wrapper )
7878+ } else {
7879+ None
7880+ } ;
78687881 let force = FORCE . parse ( matches) ;
78697882 let broadcast_only = BROADCAST_ONLY . parse ( matches) ;
78707883 let ledger_address = CONFIG_RPC_LEDGER_ADDRESS . parse ( matches) ;
@@ -7893,25 +7906,30 @@ pub mod args {
78937906 }
78947907 } ;
78957908 let device_transport = DEVICE_TRANSPORT . parse ( matches) ;
7909+ // Wrap the transaction unless we want to dump or dry-run the raw tx
7910+ let wrap_tx = match ( & dump_tx, & dry_run) {
7911+ ( _, Some ( DryRun :: Inner ) ) | ( Some ( DumpTx :: Inner ) , _) => None ,
7912+ _ => Some ( Wrapper {
7913+ broadcast_only,
7914+ fee_amount,
7915+ wrapper_fee_payer,
7916+ fee_token,
7917+ gas_limit,
7918+ } ) ,
7919+ } ;
78967920 Self {
78977921 dry_run,
7898- dry_run_wrapper,
78997922 dump_tx,
7900- dump_wrapper_tx,
79017923 force,
7902- broadcast_only,
79037924 ledger_address,
79047925 initialized_account_alias,
79057926 wallet_alias_force,
7906- fee_amount,
7907- fee_token,
7908- gas_limit,
79097927 expiration,
79107928 signing_keys,
79117929 tx_reveal_code_path,
79127930 password,
79137931 chain_id,
7914- wrapper_fee_payer ,
7932+ wrap_tx ,
79157933 output_folder,
79167934 memo,
79177935 use_device,
0 commit comments