Skip to content

Commit

Permalink
feat: build
Browse files Browse the repository at this point in the history
  • Loading branch information
rhlsthrm committed Dec 18, 2024
1 parent 5a0c991 commit 9bdf9f3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 25 deletions.
2 changes: 1 addition & 1 deletion packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
"typescript": "^5.7.2",
"viem": "^2.21.55"
}
}
}
34 changes: 10 additions & 24 deletions packages/ui/app/_components/xION/TxPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,6 @@ function TxPopup({
// 'completed' | 'error' | 'pending' | 'unknown'
// >('unknown');

const temp = {
hasHistory: false,
amount: BigInt(0),
hash: '0x1234567890abcdef1234567890abcdef12345678',
fromChain: '34443',
toChain: '8453',
approvalHash: '0x123456789',
bridgeStatus: 'unknown',
status: false,
bridgingBlock: '21212'
};

//-------------------------- for future use
// const [mock] = useLocalStorage('bridgeTx', '');
// console.log(mock);
Expand Down Expand Up @@ -118,9 +106,7 @@ function TxPopup({
<span className={`text-xs min-w-max`}>Amount</span>
<div className={`ml-auto flex gap-2`}>
<span className={`text-xs text-white/50`}>
{Number(
formatEther(mock?.amount ?? temp.amount)
).toLocaleString('en-US', {
{Number(formatEther(mock.amount)).toLocaleString('en-US', {
maximumFractionDigits: 6
})}
</span>
Expand All @@ -137,8 +123,8 @@ function TxPopup({
<div className={`ml-auto flex gap-2`}>
<span className={`text-xs text-white/50`}>
{(
Number(formatEther(mock?.amount ?? temp.amount)) -
Number(formatEther(mock?.amount ?? temp.amount)) * 0.01
Number(formatEther(mock.amount)) -
Number(formatEther(mock.amount)) * 0.01
).toLocaleString('en-US', {
maximumFractionDigits: 3
})}
Expand All @@ -155,11 +141,11 @@ function TxPopup({
<span className={`text-xs min-w-max`}>Networks</span>
<div className={`ml-auto flex items-center gap-2`}>
<span className={`text-xs text-white/50`}>
{chainsArr[+mock?.fromChain ?? temp.fromChain]}
{chainsArr[+mock.fromChain]}
</span>
{'->'}
<span className={`text-xs text-white/50`}>
{chainsArr[+mock?.toChain ?? temp.toChain]}
{chainsArr[+mock.toChain]}
</span>
</div>
</div>
Expand All @@ -168,10 +154,10 @@ function TxPopup({
<div className={`ml-auto truncate`}>
<a
target="_blank"
href={`${getScanUrlByChainId(+mock?.fromChain ?? temp.fromChain)}${mock?.approvalHash ?? temp.approvalHash}`}
href={`${getScanUrlByChainId(+mock.fromChain)}${mock.approvalHash}`}
className={`text-xs text-white/50 `}
>
{mock?.approvalHash ?? temp.approvalHash}
{mock.approvalHash}
</a>
</div>
</div>
Expand All @@ -180,10 +166,10 @@ function TxPopup({
<div className={`ml-auto truncate`}>
<a
target="_blank"
href={`${getScanUrlByChainId(+mock?.fromChain ?? temp.fromChain)}${mock?.hash ?? temp.hash}`}
href={`${getScanUrlByChainId(+mock.fromChain)}${mock.hash}`}
className={`text-xs text-white/50 `}
>
{mock?.hash ?? temp.hash}
{mock.hash}
</a>
</div>
</div>
Expand All @@ -202,7 +188,7 @@ function TxPopup({

<a
target="_blank"
href={`https://explorer.hyperlane.xyz/?search=${mock?.hash ?? temp.hash}`}
href={`https://explorer.hyperlane.xyz/?search=${mock.hash}`}
className={`my-3 py-1.5 text-sm ${pools[+chain].text} w-full ${pools[+chain].bg ?? pools[mode.id].bg} rounded-md flex items-center justify-center`}
>
TRACK
Expand Down

0 comments on commit 9bdf9f3

Please sign in to comment.