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 17, 2024
1 parent 5d000ef commit 7ee767f
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 @@ -263,9 +263,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 @@ -423,22 +420,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 7ee767f

Please sign in to comment.