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: Fix searching issue #177

Merged
merged 1 commit into from
Dec 6, 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
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
Loading