Skip to content

Commit 893bcd6

Browse files
authored
fix: double swap scenario using wrong swap fee (#863)
1 parent 01542f9 commit 893bcd6

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "app",
3-
"version": "2.14.30",
3+
"version": "2.14.31",
44
"private": true,
55
"scripts": {
66
"bump": "bump patch --tag --commit 'testnet release '",

core/src/entities/Pool.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,13 +363,13 @@ export class CompositePool implements IPool {
363363
? [this.pool1, this.pool2]
364364
: [this.pool2, this.pool1];
365365
const firstSwapFee = first.calcProviderFee(x);
366-
const firstSwapOutput = first.calcSwapResult(x);
367-
const secondSwapFee = second.calcProviderFee(firstSwapOutput);
366+
// const firstSwapOutput = first.calcSwapResult(x);
367+
// const secondSwapFee = second.calcProviderFee(firstSwapOutput);
368368
const firstSwapFeeInOutputAsset = second.calcSwapResult(firstSwapFee);
369369

370370
return AssetAmount(
371371
second.otherAsset(firstSwapFee),
372-
firstSwapFeeInOutputAsset.add(secondSwapFee),
372+
firstSwapFeeInOutputAsset.add(firstSwapFeeInOutputAsset),
373373
);
374374
}
375375

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sifchain-ui",
3-
"version": "2.14.14",
3+
"version": "2.14.31",
44
"private": true,
55
"license": "UNLICENSED",
66
"packageManager": "yarn@3.2.0",

0 commit comments

Comments
 (0)