@@ -5,7 +5,7 @@ use crate::{
5
5
use frame_support:: {
6
6
assert_noop, assert_ok,
7
7
dispatch:: Pays ,
8
- traits:: { LockableCurrency , WithdrawReasons } ,
8
+ traits:: { Currency , ExistenceRequirement , LockableCurrency , WithdrawReasons } ,
9
9
BoundedVec ,
10
10
} ;
11
11
use frame_system:: { EventRecord , Phase , RawOrigin } ;
@@ -1506,9 +1506,10 @@ fn test_node_contract_billing_cycles_cancel_contract_during_cycle_without_balanc
1506
1506
1507
1507
let extrinsic_fee = 10000 ;
1508
1508
Balances :: transfer (
1509
- RuntimeOrigin :: signed ( bob ( ) ) ,
1510
- alice ( ) ,
1509
+ & bob ( ) ,
1510
+ & alice ( ) ,
1511
1511
initial_twin_balance - total_amount_billed - extrinsic_fee,
1512
+ ExistenceRequirement :: AllowDeath ,
1512
1513
)
1513
1514
. unwrap ( ) ;
1514
1515
@@ -1641,7 +1642,13 @@ fn test_restore_node_contract_in_grace_works() {
1641
1642
run_to_block ( 31 , Some ( & mut pool_state) ) ;
1642
1643
run_to_block ( 41 , Some ( & mut pool_state) ) ;
1643
1644
// Transfer some balance to the owner of the contract to trigger the grace period to stop
1644
- Balances :: transfer ( RuntimeOrigin :: signed ( bob ( ) ) , charlie ( ) , 100000000 ) . unwrap ( ) ;
1645
+ Balances :: transfer (
1646
+ & bob ( ) ,
1647
+ & charlie ( ) ,
1648
+ 100000000 ,
1649
+ ExistenceRequirement :: AllowDeath ,
1650
+ )
1651
+ . unwrap ( ) ;
1645
1652
run_to_block ( 52 , Some ( & mut pool_state) ) ;
1646
1653
run_to_block ( 62 , Some ( & mut pool_state) ) ;
1647
1654
@@ -1881,7 +1888,13 @@ fn test_rent_contract_billing_cancel_should_bill_reserved_balance() {
1881
1888
let twin = TfgridModule :: twins ( 2 ) . unwrap ( ) ;
1882
1889
let usable_balance = Balances :: usable_balance ( & twin. account_id ) ;
1883
1890
assert_ne ! ( usable_balance, 0 ) ;
1884
- Balances :: transfer ( RuntimeOrigin :: signed ( bob ( ) ) , alice ( ) , usable_balance) . unwrap ( ) ;
1891
+ Balances :: transfer (
1892
+ & bob ( ) ,
1893
+ & alice ( ) ,
1894
+ usable_balance,
1895
+ ExistenceRequirement :: AllowDeath ,
1896
+ )
1897
+ . unwrap ( ) ;
1885
1898
1886
1899
// Last amount due is the same as the first one
1887
1900
assert_ne ! ( amount_due_as_u128, 0 ) ;
@@ -2258,7 +2271,13 @@ fn test_restore_rent_contract_in_grace_works() {
2258
2271
run_to_block ( 31 , Some ( & mut pool_state) ) ;
2259
2272
2260
2273
// Transfer some balance to the owner of the contract to trigger the grace period to stop
2261
- Balances :: transfer ( RuntimeOrigin :: signed ( bob ( ) ) , charlie ( ) , 100000000 ) . unwrap ( ) ;
2274
+ Balances :: transfer (
2275
+ & bob ( ) ,
2276
+ & charlie ( ) ,
2277
+ 100000000 ,
2278
+ ExistenceRequirement :: AllowDeath ,
2279
+ )
2280
+ . unwrap ( ) ;
2262
2281
2263
2282
pool_state
2264
2283
. write ( )
@@ -2361,7 +2380,13 @@ fn test_restore_rent_contract_and_node_contracts_in_grace_works() {
2361
2380
run_to_block ( 32 , Some ( & mut pool_state) ) ;
2362
2381
2363
2382
// Transfer some balance to the owner of the contract to trigger the grace period to stop
2364
- Balances :: transfer ( RuntimeOrigin :: signed ( bob ( ) ) , charlie ( ) , 100000000 ) . unwrap ( ) ;
2383
+ Balances :: transfer (
2384
+ & bob ( ) ,
2385
+ & charlie ( ) ,
2386
+ 100000000 ,
2387
+ ExistenceRequirement :: AllowDeath ,
2388
+ )
2389
+ . unwrap ( ) ;
2365
2390
2366
2391
pool_state
2367
2392
. write ( )
@@ -3319,7 +3344,13 @@ fn test_service_contract_bill_out_of_funds_fails() {
3319
3344
// Drain consumer account
3320
3345
let consumer_twin = TfgridModule :: twins ( 2 ) . unwrap ( ) ;
3321
3346
let consumer_balance = Balances :: free_balance ( & consumer_twin. account_id ) ;
3322
- Balances :: transfer ( RuntimeOrigin :: signed ( bob ( ) ) , alice ( ) , consumer_balance) . unwrap ( ) ;
3347
+ Balances :: transfer (
3348
+ & bob ( ) ,
3349
+ & alice ( ) ,
3350
+ consumer_balance,
3351
+ ExistenceRequirement :: AllowDeath ,
3352
+ )
3353
+ . unwrap ( ) ;
3323
3354
let consumer_balance = Balances :: free_balance ( & consumer_twin. account_id ) ;
3324
3355
assert_eq ! ( consumer_balance, 0 ) ;
3325
3356
0 commit comments