Skip to content

Commit

Permalink
Rename Critical Bridge Fn
Browse files Browse the repository at this point in the history
  • Loading branch information
pivilartisant committed Nov 20, 2023
1 parent 1681b38 commit 24848f4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pages/Index/Index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export function Index() {
useEffect(() => {
if (approveIsSuccess) {
setLoading({ approve: 'success' });
handleRedeemEVM();
handleBridge();
}
if (approveIsError) {
setLoading({
Expand Down Expand Up @@ -287,7 +287,7 @@ export function Index() {
return true;
}

async function handleRedeemEVM() {
async function handleBridge() {
setLoading({ lock: 'loading' });

try {
Expand All @@ -313,7 +313,7 @@ export function Index() {
return true;
}

async function handleBridgeMASSA(client: Client) {
async function handleRedeem(client: Client) {
try {
if (!token || !evmAddress || !amount) {
throw new Error('Missing param');
Expand Down Expand Up @@ -386,7 +386,7 @@ export function Index() {
);

if (approved) {
await handleBridgeMASSA(massaClient);
await handleRedeem(massaClient);
}
} else {
const approved = await handleApproveEVM(
Expand All @@ -400,7 +400,7 @@ export function Index() {
);

if (approved) {
await handleRedeemEVM();
await handleBridge();
}
}
}
Expand Down

0 comments on commit 24848f4

Please sign in to comment.