File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1259,7 +1259,8 @@ mod pallet {
12591259 liquidity_parameter >= MIN_LIQUIDITY . saturated_into( ) ,
12601260 Error :: <T >:: LiquidityTooLow
12611261 ) ;
1262- let pool_account_id = Self :: pool_account_id ( & market_id) ;
1262+ let pool_id = <Self as PoolStorage >:: next_pool_id ( ) ;
1263+ let pool_account_id = Self :: pool_account_id ( & pool_id) ;
12631264 let mut reserves = BTreeMap :: new ( ) ;
12641265 for ( & amount_in, & asset) in amounts_in. iter ( ) . zip ( market. outcome_assets ( ) . iter ( ) ) {
12651266 T :: MultiCurrency :: transfer ( asset, & who, & pool_account_id, amount_in) ?;
@@ -1284,7 +1285,7 @@ mod pallet {
12841285 & pool. account_id ,
12851286 T :: MultiCurrency :: minimum_balance ( collateral) ,
12861287 ) ?;
1287- let pool_id = <Self as PoolStorage >:: add ( pool) ?;
1288+ let _ = <Self as PoolStorage >:: add ( pool) ?;
12881289 MarketIdToPoolId :: < T > :: insert ( market_id, pool_id) ;
12891290 Self :: deposit_event ( Event :: < T > :: PoolDeployed {
12901291 who,
You can’t perform that action at this time.
0 commit comments