diff --git a/.release/.changeset/healthy-wombats-applaud.md b/.release/.changeset/healthy-wombats-applaud.md new file mode 100644 index 00000000..e807c3dc --- /dev/null +++ b/.release/.changeset/healthy-wombats-applaud.md @@ -0,0 +1,5 @@ +--- +'@bnb-chain/canonical-bridge-widget': patch +--- + +Use own token address for deBridge diff --git a/.release/.changeset/nice-worms-turn.md b/.release/.changeset/nice-worms-turn.md new file mode 100644 index 00000000..0fcb293a --- /dev/null +++ b/.release/.changeset/nice-worms-turn.md @@ -0,0 +1,5 @@ +--- +"@bnb-chain/canonical-bridge-widget": patch +--- + +Fix from & to chain search diff --git a/.release/.changeset/pre.json b/.release/.changeset/pre.json new file mode 100644 index 00000000..33f08799 --- /dev/null +++ b/.release/.changeset/pre.json @@ -0,0 +1,12 @@ +{ + "mode": "pre", + "tag": "alpha", + "initialVersions": { + "@bnb-chain/canonical-bridge-sdk": "0.4.2", + "@bnb-chain/canonical-bridge-widget": "0.5.8" + }, + "changesets": [ + "healthy-wombats-applaud", + "nice-worms-turn" + ] +} diff --git a/packages/canonical-bridge-widget/CHANGELOG.md b/packages/canonical-bridge-widget/CHANGELOG.md index abb9c35b..73697b03 100644 --- a/packages/canonical-bridge-widget/CHANGELOG.md +++ b/packages/canonical-bridge-widget/CHANGELOG.md @@ -1,5 +1,17 @@ # @bnb-chain/canonical-bridge-widget +## 0.5.9-alpha.1 + +### Patch Changes + +- Use own token address for deBridge + +## 0.5.9-alpha.0 + +### Patch Changes + +- Fix from & to chain search + ## 0.5.8 ### Patch Changes diff --git a/packages/canonical-bridge-widget/package.json b/packages/canonical-bridge-widget/package.json index bc4e6ce7..651564bc 100644 --- a/packages/canonical-bridge-widget/package.json +++ b/packages/canonical-bridge-widget/package.json @@ -1,6 +1,6 @@ { "name": "@bnb-chain/canonical-bridge-widget", - "version": "0.5.8", + "version": "0.5.9-alpha.1", "description": "canonical bridge widget", "author": "bnb-chain", "private": false, diff --git a/packages/canonical-bridge-widget/src/modules/aggregator/adapters/meson/MesonAdapter.ts b/packages/canonical-bridge-widget/src/modules/aggregator/adapters/meson/MesonAdapter.ts index 7d710baa..8fdd43ae 100644 --- a/packages/canonical-bridge-widget/src/modules/aggregator/adapters/meson/MesonAdapter.ts +++ b/packages/canonical-bridge-widget/src/modules/aggregator/adapters/meson/MesonAdapter.ts @@ -126,7 +126,7 @@ export class MesonAdapter extends BaseAdapter item.name.toLowerCase().includes(keyword), + filter: (item, keyword) => item.name.toLowerCase().includes(keyword?.toLowerCase()), sorter: (a) => (toChain?.id === a.id ? -1 : 0), data: toChains, }); diff --git a/packages/canonical-bridge-widget/src/modules/aggregator/components/SelectModal/SourceNetworkModal.tsx b/packages/canonical-bridge-widget/src/modules/aggregator/components/SelectModal/SourceNetworkModal.tsx index 8d30aac6..8a4ec940 100644 --- a/packages/canonical-bridge-widget/src/modules/aggregator/components/SelectModal/SourceNetworkModal.tsx +++ b/packages/canonical-bridge-widget/src/modules/aggregator/components/SelectModal/SourceNetworkModal.tsx @@ -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, }); diff --git a/packages/canonical-bridge-widget/src/modules/transfer/hooks/useLoadingBridgeFees.ts b/packages/canonical-bridge-widget/src/modules/transfer/hooks/useLoadingBridgeFees.ts index 45cddeac..b2e55bd8 100644 --- a/packages/canonical-bridge-widget/src/modules/transfer/hooks/useLoadingBridgeFees.ts +++ b/packages/canonical-bridge-widget/src/modules/transfer/hooks/useLoadingBridgeFees.ts @@ -157,10 +157,10 @@ export const useLoadingBridgeFees = () => { }, deBridgeOpts: { fromChainId: fromChain.id, - fromTokenAddress: selectedToken.address as `0x${string}`, + fromTokenAddress: selectedToken.deBridge?.address as `0x${string}`, amount, toChainId: toChain?.id, - toTokenAddress: toToken?.address as `0x${string}`, + toTokenAddress: toToken?.deBridge?.address as `0x${string}`, accesstoken: deBridgeAccessToken, userAddress: fromChain.chainType === 'solana'