@@ -71,6 +71,9 @@ benchmarks_instance_pallet! {
71
71
let dest_account = T :: AccountIdConverter :: convert_location( & dest_location) . unwrap( ) ;
72
72
73
73
<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) ;
74
77
assert!( T :: TransactAsset :: balance( & dest_account) . is_zero( ) ) ;
75
78
76
79
let mut executor = new_executor:: <T >( sender_location) ;
@@ -79,7 +82,7 @@ benchmarks_instance_pallet! {
79
82
} : {
80
83
executor. bench_process( xcm) ?;
81
84
} verify {
82
- assert!( T :: TransactAsset :: balance( & sender_account) . is_zero ( ) ) ;
85
+ assert!( T :: TransactAsset :: balance( & sender_account) < sender_account_balance_before ) ;
83
86
assert!( !T :: TransactAsset :: balance( & dest_account) . is_zero( ) ) ;
84
87
}
85
88
@@ -93,12 +96,13 @@ benchmarks_instance_pallet! {
93
96
& dest_location,
94
97
FeeReason :: TransferReserveAsset
95
98
) ;
96
- let sender_account_balance_before = T :: TransactAsset :: balance( & sender_account) ;
97
99
98
100
let asset = T :: get_multi_asset( ) ;
99
101
<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( ) ;
102
106
assert!( T :: TransactAsset :: balance( & dest_account) . is_zero( ) ) ;
103
107
104
108
let mut executor = new_executor:: <T >( sender_location) ;
0 commit comments