Skip to content

Commit

Permalink
chore: remove unneeded thrown errors
Browse files Browse the repository at this point in the history
  • Loading branch information
infiniteflower committed Oct 21, 2024
1 parent cce26fe commit c9b8a65
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions ui/ducks/bridge/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,6 @@ export const submitBridgeTransaction = (
txParams.chainId,
10,
).toPrefixedHexString() as `0x${string}`;
if (!hexChainId) {
throw new Error('Invalid chain ID');
}

const maxGasLimit = getMaxGasLimit(txParams.gasLimit ?? 0);

Expand Down Expand Up @@ -358,22 +355,7 @@ export const submitBridgeTransaction = (
decimals,
symbol,
icon: image,
chainId,
} = quoteResponse.quote.srcAsset;

const srcHexChainId = new Numeric(
quoteResponse.quote.srcChainId,
10,
).toPrefixedHexString() as `0x${string}`;
const tokenHexChainId = new Numeric(
chainId,
10,
).toPrefixedHexString() as `0x${string}`;

if (tokenHexChainId !== srcHexChainId) {
throw new Error('Token chain ID does not match source chain ID');
}

dispatch(
addToken({
address,
Expand Down

0 comments on commit c9b8a65

Please sign in to comment.