@@ -21,12 +21,16 @@ use tower_http::cors::CorsLayer;
21
21
22
22
use adapter:: { client:: Locked , Adapter , Dummy , Ethereum } ;
23
23
use primitives:: {
24
- config:: Environment , sentry:: campaign_create:: CreateCampaign , test_util:: CAMPAIGNS ,
25
- unified_num:: FromWhole , Campaign , ChainOf , Deposit , UnifiedNum , ValidatorId , spender:: Spendable ,
24
+ config:: Environment , sentry:: campaign_create:: CreateCampaign , spender:: Spendable ,
25
+ test_util:: CAMPAIGNS , unified_num:: FromWhole , Campaign , ChainOf , Deposit , UnifiedNum ,
26
+ ValidatorId ,
26
27
} ;
27
28
28
29
use crate :: {
29
- db:: { CampaignRemaining , DbPool , campaign:: insert_campaign, insert_channel, spendable:: insert_spendable} ,
30
+ db:: {
31
+ campaign:: insert_campaign, insert_channel, spendable:: insert_spendable, CampaignRemaining ,
32
+ DbPool ,
33
+ } ,
30
34
middleware:: auth:: authenticate,
31
35
platform:: PlatformApi ,
32
36
routes:: {
@@ -331,7 +335,7 @@ pub async fn seed_dummy(app: Application<Dummy>) -> Result<(), Box<dyn std::erro
331
335
uid : ValidatorId :: from ( campaign_to_create. creator ) ,
332
336
chain : campaign. chain . clone ( ) ,
333
337
} ;
334
- let _result = create_campaign (
338
+ create_campaign (
335
339
Json ( campaign_to_create) ,
336
340
Extension ( auth) ,
337
341
Extension ( Arc :: new ( app) ) ,
@@ -400,11 +404,17 @@ pub async fn seed_ethereum(app: Application<Ethereum>) -> Result<(), Box<dyn std
400
404
channel : campaign. context . channel ,
401
405
deposit : Deposit {
402
406
total : UnifiedNum :: from_u64 ( 10_000_000 ) ,
403
- }
407
+ } ,
404
408
} ;
405
- insert_channel ( & app. pool , & channel_context) . await . expect ( "Should insert channel of seed campaign" ) ;
406
- insert_campaign ( & app. pool , & campaign. context ) . await . expect ( "Should insert seed campaign" ) ;
407
- insert_spendable ( app. pool . clone ( ) , & spendable) . await . expect ( "Should insert spendable for campaign creator" ) ;
409
+ insert_channel ( & app. pool , & channel_context)
410
+ . await
411
+ . expect ( "Should insert channel of seed campaign" ) ;
412
+ insert_campaign ( & app. pool , & campaign. context )
413
+ . await
414
+ . expect ( "Should insert seed campaign" ) ;
415
+ insert_spendable ( app. pool . clone ( ) , & spendable)
416
+ . await
417
+ . expect ( "Should insert spendable for campaign creator" ) ;
408
418
409
419
Ok ( ( ) )
410
420
}
0 commit comments