Skip to content

Commit

Permalink
upgrade surf
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelQZQ committed Jul 17, 2024
1 parent bb7c6d6 commit 8844775
Show file tree
Hide file tree
Showing 4 changed files with 3,945 additions and 1,735 deletions.
5 changes: 5 additions & 0 deletions .changeset/khaki-hats-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@thalalabs/router-sdk": minor
---

upgrade surf
2 changes: 1 addition & 1 deletion packages/thalaswap-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"devDependencies": {
"@aptos-labs/ts-sdk": "^1.11.0",
"@thalalabs/surf": "^1.3.1",
"@thalalabs/surf": "^1.7.0",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.17.0",
"@typescript-eslint/eslint-plugin": "^7.10.0",
Expand Down
5 changes: 5 additions & 0 deletions packages/thalaswap-router/src/ThalaswapRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ class ThalaswapRouter {
private client: PoolDataClient;
private graph: Graph | null = null;
private coins: Coin[] | null = null;
private resourceAddress: string;

constructor(network: Network, fullnode: string, resourceAddress: string) {
this.resourceAddress = resourceAddress;
this.client = new PoolDataClient(network, fullnode, resourceAddress);
}

Expand Down Expand Up @@ -228,6 +230,7 @@ class ThalaswapRouter {
function: functionName,
typeArguments: typeArgs as any,
functionArguments: [amountInArg, amountOutArg],
address: this.resourceAddress,
});
} else if (route.path.length == 2) {
const path0 = route.path[0];
Expand All @@ -242,6 +245,7 @@ class ThalaswapRouter {
function: functionName,
typeArguments: typeArgs as any,
functionArguments: [amountInArg, amountOutArg],
address: this.resourceAddress,
});
} else {
// route.path.length == 3
Expand All @@ -259,6 +263,7 @@ class ThalaswapRouter {
function: functionName,
typeArguments: typeArgs as any,
functionArguments: [amountInArg, amountOutArg],
address: this.resourceAddress,
});
}
}
Expand Down
Loading

0 comments on commit 8844775

Please sign in to comment.