Skip to content

Commit

Permalink
fix: withdraw incentive
Browse files Browse the repository at this point in the history
  • Loading branch information
mx819812523 committed Jan 21, 2025
1 parent e3acb1b commit 7877be4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/rooch_dex/sources/liquidity_incentive.move
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ module rooch_dex::liquidity_incentive {
coin_amount: u256,
){

let reward_coin = account_coin_store::withdraw<RewardToken>(account, coin_amount);
let farming_asset = object::borrow_mut(farming_asset_obj);
assert!(address_of(account) == farming_asset.creator, ErrorNotCreator);
coin_store::deposit(&mut farming_asset.coin_store, reward_coin)
let coin = coin_store::withdraw(&mut farming_asset.coin_store, coin_amount);
account_coin_store::deposit(farming_asset.creator, coin)
}


Expand Down

0 comments on commit 7877be4

Please sign in to comment.