Skip to content

Commit

Permalink
feat(canonical-bridge-widget): Update widget ui
Browse files Browse the repository at this point in the history
  • Loading branch information
aiden-cao committed Oct 31, 2024
1 parent be6028b commit 2fc96a2
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .release/.changeset/dirty-shoes-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bnb-chain/canonical-bridge-widget": patch
---

Update widget ui
1 change: 1 addition & 0 deletions .release/.changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"changesets": [
"chilled-lizards-compare",
"cyan-boxes-judge",
"dirty-shoes-tap",
"early-drinks-bathe",
"fuzzy-houses-complain",
"long-ears-press",
Expand Down
6 changes: 6 additions & 0 deletions packages/canonical-bridge-widget/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @bnb-chain/canonical-bridge-widget

## 0.3.2-alpha.17

### Patch Changes

- Update widget ui

## 0.3.2-alpha.16

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/canonical-bridge-widget/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bnb-chain/canonical-bridge-widget",
"version": "0.3.2-alpha.16",
"version": "0.3.2-alpha.17",
"description": "canonical bridge widget",
"author": "bnb-chain",
"private": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,16 @@ export const ReceiveInfo = ({ onOpen }: ReceiveInfoProps) => {

const isHideSection = useMemo(() => {
// no receive amount and some routes are displayed
return !Number(sendValue);
}, [sendValue]);
if (!Number(sendValue)) return true;
if (isGlobalFeeLoading) return false;
return (
!Number(sendValue) ||
(!isBase &&
estimatedAmount &&
!Object.values(estimatedAmount).every((element) => element === undefined) &&
!receiveAmt)
);
}, [sendValue, estimatedAmount, receiveAmt, isGlobalFeeLoading, isBase]);

const isHideRouteButton = useMemo(() => {
return (
Expand Down

0 comments on commit 2fc96a2

Please sign in to comment.