Skip to content

Commit

Permalink
native token decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoch05 committed Sep 6, 2024
1 parent 0bf111b commit 4004e2e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/relayer/relayer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,23 +343,27 @@ export class RelayerService implements OnModuleInit {
}
var fromTokenContract,
toTokenContract = null;
var fromTokenDecimals,
toTokenDecimals = 18;
if (fromToken.address !== zeroAddress) {
fromTokenContract = new Erc20Contract(
fromToken.address,
fromWallet
);
fromTokenDecimals = -1;
}
if (toToken.address !== zeroAddress) {
toTokenContract = new Erc20Contract(
toToken.address,
toWallet
);
toTokenDecimals = -1;
}
return {
fromAddress: fromToken.address,
toAddress: toToken.address,
fromTokenDecimals: -1,
toTokenDecimals: -1,
fromTokenDecimals: fromTokenDecimals,
toTokenDecimals: toTokenDecimals,
fromToken: fromTokenContract,
toToken: toTokenContract,
relayer:
Expand Down

0 comments on commit 4004e2e

Please sign in to comment.