Skip to content

Commit

Permalink
no BLL failure when approving
Browse files Browse the repository at this point in the history
  • Loading branch information
jscriptcoder committed Jun 12, 2023
1 parent 9f092a4 commit c37e1bf
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions packages/bridge-ui/src/components/BridgeForm/BridgeForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -238,26 +238,19 @@
const headerError = '<strong>Failed to approve</strong><br />';
// TODO: I think this is no needed here. Approving won't be affected by
// failing logic in BLL token. Remove when this is fully confirmed.
const noteError =
_token.symbol.toLocaleLowerCase() === 'bll'
? '<div class="mt-2 text-xs"><strong>Note</strong>: BLL token intentionally will fail 50% of the time</div>'
: '';
if (error.cause?.status === 0) {
const explorerUrl = `${$srcChain.explorerUrl}/tx/${error.cause.transactionHash}`;
const htmlLink = `<a href="${explorerUrl}" target="_blank"><b><u>here</u></b></a>`;
errorToast(
`${headerError}Click ${htmlLink} to see more details on the explorer.${noteError}`,
`${headerError}Click ${htmlLink} to see more details on the explorer.`,
true, // dismissible
);
} else if (
[error.code, error.cause?.code].includes(ethers.errors.ACTION_REJECTED)
) {
warningToast(`Transaction has been rejected.`);
} else {
errorToast(`${headerError}Try again later.${noteError}`);
errorToast(`${headerError}Try again later.`);
}
}
}
Expand Down

0 comments on commit c37e1bf

Please sign in to comment.