@@ -68,15 +68,16 @@ fn test_update_config() {
68
68
let mut deps = mock_dependencies ( & [ ] ) ;
69
69
let api = deps. api ;
70
70
71
- deps. querier . add_wasm_query_response ( api. addr_make ( "token_contract" ) . as_str ( ) , |_| {
72
- cosmwasm_std:: ContractResult :: Ok (
73
- to_json_binary ( & drop_staking_base:: msg:: token:: ConfigResponse {
74
- factory_contract : api. addr_make ( "factory_contract" ) . to_string ( ) ,
75
- denom : "ld_denom" . to_string ( ) ,
76
- } )
77
- . unwrap ( ) ,
78
- )
79
- } ) ;
71
+ deps. querier
72
+ . add_wasm_query_response ( api. addr_make ( "token_contract" ) . as_str ( ) , move |_| {
73
+ cosmwasm_std:: ContractResult :: Ok (
74
+ to_json_binary ( & drop_staking_base:: msg:: token:: ConfigResponse {
75
+ factory_contract : api. addr_make ( "factory_contract" ) . to_string ( ) ,
76
+ denom : "ld_denom" . to_string ( ) ,
77
+ } )
78
+ . unwrap ( ) ,
79
+ )
80
+ } ) ;
80
81
deps. querier
81
82
. add_wasm_query_response ( "old_token_contract" , |_| {
82
83
cosmwasm_std:: ContractResult :: Ok (
@@ -331,9 +332,10 @@ fn test_add_remove_bond_provider() {
331
332
to_json_binary:: <Vec <( Addr , bool ) >>( & vec![ ] ) . unwrap( )
332
333
) ;
333
334
334
- deps. querier . add_wasm_query_response ( bond_provider_address. as_str ( ) , |_| {
335
- cosmwasm_std:: ContractResult :: Ok ( to_json_binary ( & true ) . unwrap ( ) )
336
- } ) ;
335
+ deps. querier
336
+ . add_wasm_query_response ( bond_provider_address. as_str ( ) , |_| {
337
+ cosmwasm_std:: ContractResult :: Ok ( to_json_binary ( & true ) . unwrap ( ) )
338
+ } ) ;
337
339
338
340
let res = execute (
339
341
deps. as_mut ( ) ,
@@ -950,7 +952,11 @@ fn test_tick_claiming_error_wo_transfer() {
950
952
let q: StrategyQueryMsg = from_json ( msg) . unwrap ( ) ;
951
953
match q {
952
954
StrategyQueryMsg :: CalcDeposit { deposit } => cosmwasm_std:: ContractResult :: Ok (
953
- to_json_binary ( & vec ! [ ( api. addr_make( "valoper_address" ) . to_string( ) , deposit) ] ) . unwrap ( ) ,
955
+ to_json_binary ( & vec ! [ (
956
+ api. addr_make( "valoper_address" ) . to_string( ) ,
957
+ deposit,
958
+ ) ] )
959
+ . unwrap ( ) ,
954
960
) ,
955
961
_ => unimplemented ! ( ) ,
956
962
}
@@ -1070,7 +1076,11 @@ fn test_tick_claiming_error_with_transfer() {
1070
1076
let q: StrategyQueryMsg = from_json ( msg) . unwrap ( ) ;
1071
1077
match q {
1072
1078
StrategyQueryMsg :: CalcDeposit { deposit } => cosmwasm_std:: ContractResult :: Ok (
1073
- to_json_binary ( & vec ! [ ( api. addr_make( "valoper_address" ) . to_string( ) , deposit) ] ) . unwrap ( ) ,
1079
+ to_json_binary ( & vec ! [ (
1080
+ api. addr_make( "valoper_address" ) . to_string( ) ,
1081
+ deposit,
1082
+ ) ] )
1083
+ . unwrap ( ) ,
1074
1084
) ,
1075
1085
_ => unimplemented ! ( ) ,
1076
1086
}
@@ -1241,7 +1251,11 @@ fn test_tick_claiming_wo_transfer_unbonding() {
1241
1251
let q: StrategyQueryMsg = from_json ( msg) . unwrap ( ) ;
1242
1252
match q {
1243
1253
StrategyQueryMsg :: CalcWithdraw { withdraw } => cosmwasm_std:: ContractResult :: Ok (
1244
- to_json_binary ( & vec ! [ ( api. addr_make( "valoper_address" ) . to_string( ) , withdraw) ] ) . unwrap ( ) ,
1254
+ to_json_binary ( & vec ! [ (
1255
+ api. addr_make( "valoper_address" ) . to_string( ) ,
1256
+ withdraw,
1257
+ ) ] )
1258
+ . unwrap ( ) ,
1245
1259
) ,
1246
1260
_ => unimplemented ! ( ) ,
1247
1261
}
@@ -1426,7 +1440,11 @@ fn test_tick_claiming_wo_idle() {
1426
1440
let q: StrategyQueryMsg = from_json ( msg) . unwrap ( ) ;
1427
1441
match q {
1428
1442
StrategyQueryMsg :: CalcWithdraw { withdraw } => cosmwasm_std:: ContractResult :: Ok (
1429
- to_json_binary ( & vec ! [ ( api. addr_make( "valoper_address" ) . to_string( ) , withdraw) ] ) . unwrap ( ) ,
1443
+ to_json_binary ( & vec ! [ (
1444
+ api. addr_make( "valoper_address" ) . to_string( ) ,
1445
+ withdraw,
1446
+ ) ] )
1447
+ . unwrap ( ) ,
1430
1448
) ,
1431
1449
_ => unimplemented ! ( ) ,
1432
1450
}
@@ -1965,7 +1983,7 @@ fn test_bond_lsm_share_increase_exchange_rate() {
1965
1983
BOND_PROVIDERS . init ( deps. as_mut ( ) . storage ) . unwrap ( ) ;
1966
1984
1967
1985
deps. querier
1968
- . add_wasm_query_response ( api. addr_make ( "puppeteer_contract" ) . as_str ( ) , |_| {
1986
+ . add_wasm_query_response ( api. addr_make ( "puppeteer_contract" ) . as_str ( ) , move |_| {
1969
1987
cosmwasm_std:: ContractResult :: Ok (
1970
1988
to_json_binary ( & DelegationsResponse {
1971
1989
delegations : Delegations {
@@ -1984,7 +2002,7 @@ fn test_bond_lsm_share_increase_exchange_rate() {
1984
2002
)
1985
2003
} ) ;
1986
2004
deps. querier
1987
- . add_wasm_query_response ( api. addr_make ( "puppeteer_contract" ) . as_str ( ) , |_| {
2005
+ . add_wasm_query_response ( api. addr_make ( "puppeteer_contract" ) . as_str ( ) , move |_| {
1988
2006
cosmwasm_std:: ContractResult :: Ok (
1989
2007
to_json_binary ( & DelegationsResponse {
1990
2008
delegations : Delegations {
@@ -2090,11 +2108,14 @@ fn test_unbond() {
2090
2108
let mut env = mock_env ( ) ;
2091
2109
2092
2110
deps. querier
2093
- . add_wasm_query_response ( "factory_contract" , |_| {
2111
+ . add_wasm_query_response ( "factory_contract" , move |_| {
2094
2112
cosmwasm_std:: ContractResult :: Ok (
2095
2113
to_json_binary ( & HashMap :: from ( [
2096
2114
( "token_contract" , api. addr_make ( "token_contract" ) . as_str ( ) ) ,
2097
- ( "withdrawal_voucher_contract" , api. addr_make ( "withdrawal_voucher_contract" ) . as_str ( ) ) ,
2115
+ (
2116
+ "withdrawal_voucher_contract" ,
2117
+ api. addr_make ( "withdrawal_voucher_contract" ) . as_str ( ) ,
2118
+ ) ,
2098
2119
] ) )
2099
2120
. unwrap ( ) ,
2100
2121
)
0 commit comments