Skip to content

Commit

Permalink
fix: double swap scenario using wrong swap fee (#863)
Browse files Browse the repository at this point in the history
  • Loading branch information
snobbee authored Dec 23, 2023
1 parent 01542f9 commit 893bcd6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "app",
"version": "2.14.30",
"version": "2.14.31",
"private": true,
"scripts": {
"bump": "bump patch --tag --commit 'testnet release '",
Expand Down
6 changes: 3 additions & 3 deletions core/src/entities/Pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,13 @@ export class CompositePool implements IPool {
? [this.pool1, this.pool2]
: [this.pool2, this.pool1];
const firstSwapFee = first.calcProviderFee(x);
const firstSwapOutput = first.calcSwapResult(x);
const secondSwapFee = second.calcProviderFee(firstSwapOutput);
// const firstSwapOutput = first.calcSwapResult(x);
// const secondSwapFee = second.calcProviderFee(firstSwapOutput);
const firstSwapFeeInOutputAsset = second.calcSwapResult(firstSwapFee);

return AssetAmount(
second.otherAsset(firstSwapFee),
firstSwapFeeInOutputAsset.add(secondSwapFee),
firstSwapFeeInOutputAsset.add(firstSwapFeeInOutputAsset),
);
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sifchain-ui",
"version": "2.14.14",
"version": "2.14.31",
"private": true,
"license": "UNLICENSED",
"packageManager": "yarn@3.2.0",
Expand Down

1 comment on commit 893bcd6

@vercel
Copy link

@vercel vercel bot commented on 893bcd6 Dec 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

sifchain-ui – ./

dex.sifchain.finance
sifchain-ui-sifchain.vercel.app
sifchain-ui-git-master-sifchain.vercel.app

Please sign in to comment.