Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dbk chain bridge status #2622

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading