Skip to content

Commit

Permalink
fix: add token mapping exception for sepolia (across-protocol#1999)
Browse files Browse the repository at this point in the history
Signed-off-by: bennett <[email protected]>
  • Loading branch information
bmzig authored Jan 13, 2025
1 parent b7db630 commit 80d5f8c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/clients/ProfitClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,12 @@ export class ProfitClient {
.filter(({ symbol }) => isDefined(TOKEN_SYMBOLS_MAP[symbol]))
.map(({ symbol }) => {
const { addresses } = TOKEN_SYMBOLS_MAP[symbol];
const address = addresses[CHAIN_IDs.MAINNET];
let address = addresses[CHAIN_IDs.MAINNET];
// For testnet only, if we cannot resolve the token address, revert to ETH. On mainnet, if `address` is undefined,
// we will throw an error instead.
if (this.hubPoolClient.chainId === CHAIN_IDs.SEPOLIA && !isDefined(address)) {
address = TOKEN_SYMBOLS_MAP.ETH.addresses[CHAIN_IDs.MAINNET];
}
return [symbol, address];
})
);
Expand Down

0 comments on commit 80d5f8c

Please sign in to comment.