Skip to content

Commit

Permalink
Handle the deleted RAMM's LP token Bag of Supplyes
Browse files Browse the repository at this point in the history
  • Loading branch information
rockbmb committed Apr 21, 2024
1 parent f5fe837 commit cc2ce5e
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions ramm-sui/sources/ramm.move
Original file line number Diff line number Diff line change
Expand Up @@ -763,12 +763,29 @@ module ramm_sui::ramm {

typed_balances.destroy_empty();
collected_protocol_fees.destroy_empty();
/*
*/

transfer::public_transfer(fst_coin, fee_collector);
transfer::public_transfer(snd_coin, fee_collector);
transfer::public_transfer(trd_coin, fee_collector);
/*
*/

/*
Handle `typed_lp_tokens_issued`
*/

let fst_supply: Supply<Asset1> = typed_lp_tokens_issued.remove(fst_ix);
let snd_supply: Supply<Asset2> = typed_lp_tokens_issued.remove(snd_ix);
let trd_supply: Supply<Asset3> = typed_lp_tokens_issued.remove(trd_ix);

transfer::public_transfer(fst_supply, fee_collector);
transfer::public_transfer(snd_supply, fee_collector);
transfer::public_transfer(trd_supply, fee_collector);

typed_lp_tokens_issued.destroy_empty();

/*
*/

ramm_uid.delete();
}
Expand Down

0 comments on commit cc2ce5e

Please sign in to comment.