@@ -71,6 +71,9 @@ benchmarks_instance_pallet! {
7171 let dest_account = T :: AccountIdConverter :: convert_location( & dest_location) . unwrap( ) ;
7272
7373 <AssetTransactorOf <T >>:: deposit_asset( & asset, & sender_location, None ) . unwrap( ) ;
74+ // We deposit the asset twice so we have enough for ED after transferring
75+ <AssetTransactorOf <T >>:: deposit_asset( & asset, & sender_location, None ) . unwrap( ) ;
76+ let sender_account_balance_before = T :: TransactAsset :: balance( & sender_account) ;
7477 assert!( T :: TransactAsset :: balance( & dest_account) . is_zero( ) ) ;
7578
7679 let mut executor = new_executor:: <T >( sender_location) ;
@@ -79,7 +82,7 @@ benchmarks_instance_pallet! {
7982 } : {
8083 executor. bench_process( xcm) ?;
8184 } verify {
82- assert!( T :: TransactAsset :: balance( & sender_account) . is_zero ( ) ) ;
85+ assert!( T :: TransactAsset :: balance( & sender_account) < sender_account_balance_before ) ;
8386 assert!( !T :: TransactAsset :: balance( & dest_account) . is_zero( ) ) ;
8487 }
8588
@@ -93,12 +96,13 @@ benchmarks_instance_pallet! {
9396 & dest_location,
9497 FeeReason :: TransferReserveAsset
9598 ) ;
96- let sender_account_balance_before = T :: TransactAsset :: balance( & sender_account) ;
9799
98100 let asset = T :: get_multi_asset( ) ;
99101 <AssetTransactorOf <T >>:: deposit_asset( & asset, & sender_location, None ) . unwrap( ) ;
100- assert!( T :: TransactAsset :: balance( & sender_account) > sender_account_balance_before) ;
101- let assets: MultiAssets = vec![ asset ] . into( ) ;
102+ // We deposit the asset twice so we have enough for ED after transferring
103+ <AssetTransactorOf <T >>:: deposit_asset( & asset, & sender_location, None ) . unwrap( ) ;
104+ let sender_account_balance_before = T :: TransactAsset :: balance( & sender_account) ;
105+ let assets: MultiAssets = vec![ asset] . into( ) ;
102106 assert!( T :: TransactAsset :: balance( & dest_account) . is_zero( ) ) ;
103107
104108 let mut executor = new_executor:: <T >( sender_location) ;
0 commit comments