Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit cb23f84

Browse files
authored
Fix accounting (#21)
1 parent 43ed842 commit cb23f84

File tree

1 file changed

+1
-1
lines changed
  • programs/perpetuals/src/instructions

1 file changed

+1
-1
lines changed

programs/perpetuals/src/instructions/swap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ pub fn swap(ctx: Context<Swap>, params: &SwapParams) -> Result<()> {
267267

268268
receiving_custody.collected_fees.swap_usd =
269269
receiving_custody.collected_fees.swap_usd.wrapping_add(
270-
dispensed_token_price.get_asset_amount_usd(fees.0, dispensing_custody.decimals)?,
270+
received_token_price.get_asset_amount_usd(fees.0, receiving_custody.decimals)?,
271271
);
272272

273273
receiving_custody.assets.owned =

0 commit comments

Comments
 (0)