Skip to content

Commit

Permalink
Merge pull request #177 from bnb-chain/fix1206v1
Browse files Browse the repository at this point in the history
fix: Fix searching issue
  • Loading branch information
wenty22 authored Dec 6, 2024
2 parents 5a30bc4 + 1b33d4f commit 0d40ad0
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .release/.changeset/nice-worms-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bnb-chain/canonical-bridge-widget": patch
---

Fix from & to chain search
11 changes: 11 additions & 0 deletions .release/.changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"mode": "pre",
"tag": "alpha",
"initialVersions": {
"@bnb-chain/canonical-bridge-sdk": "0.4.2",
"@bnb-chain/canonical-bridge-widget": "0.5.8"
},
"changesets": [
"nice-worms-turn"
]
}
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.5.9-alpha.0

### Patch Changes

- Fix from & to chain search

## 0.5.8

### 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.5.8",
"version": "0.5.9-alpha.0",
"description": "canonical bridge widget",
"author": "bnb-chain",
"private": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class MesonAdapter extends BaseAdapter<IMesonChain[], IMesonChain, IMeson

public getTokenInfo({ chainId, token }: { chainId: number; token: IMesonToken }) {
return {
name: (token as any).id, // TODO
name: (token as any).id?.toUpperCase(), // TODO
symbol: token.id.toUpperCase(),
address: token.addr ?? '0x0000000000000000000000000000000000000000',
decimals: token.decimals,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function DestinationNetworkModal(props: DestinationNetworkModalProps) {
});

const { isNoResult, result, onSearch } = useSearch({
filter: (item, keyword) => item.name.toLowerCase().includes(keyword),
filter: (item, keyword) => item.name.toLowerCase().includes(keyword?.toLowerCase()),
sorter: (a) => (toChain?.id === a.id ? -1 : 0),
data: toChains,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function SourceNetworkModal(props: SourceNetworkModalProps) {
});

const { isNoResult, result, onSearch } = useSearch({
filter: (item, keyword) => item.name.toLowerCase().includes(keyword),
filter: (item, keyword) => item.name.toLowerCase().includes(keyword?.toLowerCase()),
sorter: (a) => (fromChain?.id === a.id ? -1 : 0),
data: fromChains,
});
Expand Down

0 comments on commit 0d40ad0

Please sign in to comment.