Skip to content

Commit

Permalink
fix(bridge-ui-v2): fix ETH bridging (#15549)
Browse files Browse the repository at this point in the history
  • Loading branch information
KorbinianK authored Jan 24, 2024
1 parent d33e130 commit 4921572
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/bridge-ui-v2/src/components/Bridge/Actions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@
onMount(async () => {
$validatingAmount = true;
if ($selectedTokenIsBridged) {
$allApproved = true;
$insufficientAllowance = false;
} else {
getTokenApprovalStatus($selectedToken);
if ($selectedToken) {
if ($selectedTokenIsBridged) {
$allApproved = true;
$insufficientAllowance = false;
} else {
getTokenApprovalStatus($selectedToken);
}
}
isValidTokenBalance();
$validatingAmount = false;
Expand Down Expand Up @@ -112,7 +114,7 @@
$: isERC1155 = $selectedToken?.type === TokenType.ERC1155;
$: isETH = $selectedToken?.type === TokenType.ETH;
$: validApprovalStatus = $selectedTokenIsBridged ? true : $allApproved;
$: validApprovalStatus = $selectedTokenIsBridged || isETH ? true : $allApproved;
$: commonConditions =
validApprovalStatus &&
Expand Down

0 comments on commit 4921572

Please sign in to comment.