Skip to content

Commit

Permalink
chore: make tsc happy on typechecking (#1930)
Browse files Browse the repository at this point in the history
  • Loading branch information
shineli1984 authored Jun 21, 2024
1 parent 3617527 commit 0543dc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/internal/bridge/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"lint": "eslint ./src --ext .ts --max-warnings=0",
"lint:fix": "cd ../../../../ && yarn wsrun -p @imtbl/bridge-sdk -c lint --fix",
"test": "jest test -- --silent=false",
"test:watch": "jest --watch"
"test:watch": "jest --watch",
"typecheck": "tsc --noEmit"
},
"source": "src/index.ts",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/internal/bridge/sdk/src/tokenBridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export class TokenBridge {
if (!isNativeTokenBridgeFeeRequest(req)) {
if (isValidDeposit(direction, this.config.bridgeInstance)) {
approvalFee = calculateGasFee(feeData, BridgeMethodsGasLimit.APPROVE_TOKEN);
} else if (isWithdrawWrappedIMX(req.token, direction, this.config.bridgeInstance)) {
} else if ('token' in req && isWithdrawWrappedIMX(req.token, direction, this.config.bridgeInstance)) {
// On child chain, only WIMX requires approval.
approvalFee = calculateGasFee(feeData, BridgeMethodsGasLimit.APPROVE_TOKEN);
}
Expand Down

0 comments on commit 0543dc4

Please sign in to comment.