Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
fix: daily limit should use calcMaxWithdraw function
Browse files Browse the repository at this point in the history
  • Loading branch information
JayJay1024 committed Mar 28, 2024
1 parent 27ed24e commit 109bd1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bridges/xtoken-next.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export class XTokenNextBridge extends BaseBridge {
const limit = await this.targetPublicClient.readContract({
address: this.contract.targetAddress,
abi: (await import("@/abi/xtoken-issuing-next")).default,
functionName: "dailyLimit",
functionName: "calcMaxWithdraw",
args: [this.targetToken.inner],
});
return { limit, spent: 0n, token: this.sourceToken };
Expand Down
2 changes: 1 addition & 1 deletion src/bridges/xtoken-v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export class XTokenV3Bridge extends BaseBridge {
const limit = await this.targetPublicClient.readContract({
address: this.contract.targetAddress,
abi: (await import("@/abi/xtoken-issuing")).default,
functionName: "dailyLimit",
functionName: "calcMaxWithdraw",
args: [this.targetToken.address],
});
return { limit, spent: 0n, token: this.sourceToken };
Expand Down

0 comments on commit 109bd1a

Please sign in to comment.