Skip to content

Commit

Permalink
fix: dbk chain bridge status
Browse files Browse the repository at this point in the history
  • Loading branch information
cs1707 committed Nov 13, 2024
1 parent b61f228 commit 034e89e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,37 @@ const ActivityBridgeStatus = ({
}
return (
<div className="mt-[16px] flex flex-col gap-[12px] items-start">
<div
className="inline-flex items-center gap-[6px] px-[10px] py-[6px] rounded-full bg-r-green-light cursor-pointer"
onClick={() => {
openInTab(getTxScanLink(chain.scanLink, item.tx_id));
}}
>
<RcIconChecked className="text-r-green-default" />
<div className="text-[13px] leading-[16px] text-r-green-default font-bold">
{t('page.ecology.dbk.bridge.ActivityPopup.status.withdraw')}
{status === 'withdraw-pending' ? (
<div
className={clsx(
'inline-flex items-center gap-[6px]',
'px-[10px] py-[6px] rounded-full',
'bg-[rgba(255,124,96,0.10)] text-r-orange-DBK cursor-pointer'
)}
onClick={() => {
openInTab(getTxScanLink(chain.scanLink, item.tx_id));
}}
>
<Loading3QuartersOutlined className="text-[14px] animate-spin block" />
<div className="text-[13px] leading-[16px] font-bold">
{t('page.ecology.dbk.bridge.ActivityPopup.status.withdraw')}
</div>
<RcIconJump />
</div>
<RcIconJump className="text-r-green-default" />
</div>
) : (
<div
className="inline-flex items-center gap-[6px] px-[10px] py-[6px] rounded-full bg-r-green-light cursor-pointer"
onClick={() => {
openInTab(getTxScanLink(chain.scanLink, item.tx_id));
}}
>
<RcIconChecked className="text-r-green-default" />
<div className="text-[13px] leading-[16px] text-r-green-default font-bold">
{t('page.ecology.dbk.bridge.ActivityPopup.status.withdraw')}
</div>
<RcIconJump className="text-r-green-default" />
</div>
)}
{status === 'waiting-to-prove' ? (
<div className="flex items-center justify-between w-full">
<div
Expand Down
2 changes: 2 additions & 0 deletions src/ui/views/Ecology/dbk-chain/utils/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export const checkBridgeStatus = async ({
});
return 'finalized' as const;
} catch (e) {
console.error(e);
return 'deposit-pending' as const;
}
} else {
Expand All @@ -166,6 +167,7 @@ export const checkBridgeStatus = async ({
});
} catch (e) {
console.error(e);
return 'withdraw-pending' as const;
}
}
};
Expand Down

0 comments on commit 034e89e

Please sign in to comment.