diff --git a/.release/.changeset/hot-knives-pay.md b/.release/.changeset/hot-knives-pay.md new file mode 100644 index 00000000..3f2a69df --- /dev/null +++ b/.release/.changeset/hot-knives-pay.md @@ -0,0 +1,5 @@ +--- +"@bnb-chain/canonical-bridge-widget": patch +--- + +feat: Send confirm popup diff --git a/.release/.changeset/pre.json b/.release/.changeset/pre.json new file mode 100644 index 00000000..07072fdc --- /dev/null +++ b/.release/.changeset/pre.json @@ -0,0 +1,11 @@ +{ + "mode": "pre", + "tag": "alpha", + "initialVersions": { + "@bnb-chain/canonical-bridge-sdk": "0.4.6", + "@bnb-chain/canonical-bridge-widget": "0.5.16" + }, + "changesets": [ + "hot-knives-pay" + ] +} diff --git a/apps/canonical-bridge-server/src/shared/web3/web3.service.ts b/apps/canonical-bridge-server/src/shared/web3/web3.service.ts index 82cb83a4..3b7ee373 100644 --- a/apps/canonical-bridge-server/src/shared/web3/web3.service.ts +++ b/apps/canonical-bridge-server/src/shared/web3/web3.service.ts @@ -60,41 +60,41 @@ export class Web3Service { } async getTransferConfigsForAll() { - // try { - const { data } = await this.httpService.axiosRef.get( - `${CBRIDGE_ENDPOINT}/v2/getTransferConfigsForAll`, - ); - return data; - // } catch (e) { - // console.error(`Failed to retrieve cBridge data at ${new Date().getTime()}`, e.message); - // } + try { + const { data } = await this.httpService.axiosRef.get( + `${CBRIDGE_ENDPOINT}/v2/getTransferConfigsForAll`, + ); + return data; + } catch (e) { + console.error(`Failed to retrieve cBridge data at ${new Date().getTime()}`, e.message); + } } async getDebridgeChains() { - // try { - const { data } = await this.httpService.axiosRef.get<{ chains: IDebridgeChain[] }>( - `${DEBRIDGE_ENDPOINT}/supported-chains-info`, - ); + try { + const { data } = await this.httpService.axiosRef.get<{ chains: IDebridgeChain[] }>( + `${DEBRIDGE_ENDPOINT}/supported-chains-info`, + ); - return data; - // } catch (e) { - // console.error(`Failed to retrieve DeBridge chain data at ${new Date().getTime()}`, e.message); - // } + return data; + } catch (e) { + console.error(`Failed to retrieve DeBridge chain data at ${new Date().getTime()}`, e.message); + } } async getDebridgeChainTokens(chainId: number) { - // try { - const { data } = await this.httpService.axiosRef.get<{ - tokens: Record; - }>(`${DEBRIDGE_ENDPOINT}/token-list?chainId=${chainId}`); + try { + const { data } = await this.httpService.axiosRef.get<{ + tokens: Record; + }>(`${DEBRIDGE_ENDPOINT}/token-list?chainId=${chainId}`); - return data; - // } catch (e) { - // console.error( - // `Failed to retrieve DeBridge token data from ${chainId} at ${new Date().getTime()}`, - // e.message, - // ); - // } + return data; + } catch (e) { + console.error( + `Failed to retrieve DeBridge token data from ${chainId} at ${new Date().getTime()}`, + e.message, + ); + } } async getStargateConfigs() { diff --git a/apps/canonical-bridge-ui/package.json b/apps/canonical-bridge-ui/package.json index d6e43607..4f86c081 100644 --- a/apps/canonical-bridge-ui/package.json +++ b/apps/canonical-bridge-ui/package.json @@ -15,7 +15,7 @@ "@emotion/css": "~11.13.0", "@emotion/react": "~11.13.3", "@emotion/styled": "~11.13.0", - "@node-real/walletkit": "2.7.3", + "@node-real/walletkit": "2.4.1-alpha.8", "@solana/spl-token": "~0.4.9", "@solana/wallet-adapter-react": "~0.15.35", "@solana/web3.js": "~1.95.4", diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index a8964adf..474d8295 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -140,8 +140,8 @@ importers: specifier: ~11.13.0 version: 11.13.0(@emotion/react@11.13.3(@types/react@18.3.12)(react@18.3.1)(supports-color@9.4.0))(@types/react@18.3.12)(react@18.3.1)(supports-color@9.4.0) '@node-real/walletkit': - specifier: 2.7.3 - version: 2.7.3(@babel/core@7.26.0(supports-color@9.4.0))(@babel/runtime@7.26.0)(@react-native-async-storage/async-storage@1.24.0)(@tanstack/react-query@5.50.1(react@18.3.1))(bs58@6.0.0)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.4.1(supports-color@9.4.0))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(supports-color@9.4.0)(tslib@2.8.1)(utf-8-validate@5.0.10)(viem@2.21.48(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10))(wagmi@2.12.33(@react-native-async-storage/async-storage@1.24.0)(@tanstack/query-core@5.50.1)(@tanstack/react-query@5.50.1(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.4.1(supports-color@9.4.0))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(supports-color@9.4.0)(typescript@5.5.4)(utf-8-validate@5.0.10)(viem@2.21.48(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10))) + specifier: 2.4.1-alpha.8 + version: 2.4.1-alpha.8(@babel/core@7.26.0(supports-color@9.4.0))(@babel/runtime@7.26.0)(@react-native-async-storage/async-storage@1.24.0)(@tanstack/react-query@5.50.1(react@18.3.1))(bs58@6.0.0)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.4.1(supports-color@9.4.0))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(supports-color@9.4.0)(tslib@2.8.1)(utf-8-validate@5.0.10)(viem@2.21.48(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10))(wagmi@2.12.33(@react-native-async-storage/async-storage@1.24.0)(@tanstack/query-core@5.50.1)(@tanstack/react-query@5.50.1(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.4.1(supports-color@9.4.0))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(supports-color@9.4.0)(typescript@5.5.4)(utf-8-validate@5.0.10)(viem@2.21.48(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10))) '@solana/spl-token': specifier: ~0.4.9 version: 0.4.9(@solana/web3.js@1.95.4(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.5.4)(utf-8-validate@5.0.10) @@ -3083,8 +3083,8 @@ packages: resolution: {integrity: sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==} engines: {node: ^14.21.3 || >=16} - '@node-real/walletkit@2.7.3': - resolution: {integrity: sha512-+Kd1HxTnVGQdjQ6SarOtFYQOJc538ybM4K8tpMs5Dvp5Rim5sze311P6WV2TxXtuA4j9vWeZjTf75WaYgOqang==} + '@node-real/walletkit@2.4.1-alpha.8': + resolution: {integrity: sha512-JfmA0yfdhAgeviPZjrgh3iJPXR0msE6XE556dwqyJbYF8d+IVzvvBmOPrJ5no+jl9jc25O/2OdF1mfr4kjuCYw==} peerDependencies: '@tanstack/react-query': ^5 react: '>=17' @@ -16048,7 +16048,7 @@ snapshots: '@noble/hashes@1.5.0': {} - '@node-real/walletkit@2.7.3(@babel/core@7.26.0(supports-color@9.4.0))(@babel/runtime@7.26.0)(@react-native-async-storage/async-storage@1.24.0)(@tanstack/react-query@5.50.1(react@18.3.1))(bs58@6.0.0)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.4.1(supports-color@9.4.0))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(supports-color@9.4.0)(tslib@2.8.1)(utf-8-validate@5.0.10)(viem@2.21.48(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10))(wagmi@2.12.33(@react-native-async-storage/async-storage@1.24.0)(@tanstack/query-core@5.50.1)(@tanstack/react-query@5.50.1(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.4.1(supports-color@9.4.0))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(supports-color@9.4.0)(typescript@5.5.4)(utf-8-validate@5.0.10)(viem@2.21.48(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)))': + '@node-real/walletkit@2.4.1-alpha.8(@babel/core@7.26.0(supports-color@9.4.0))(@babel/runtime@7.26.0)(@react-native-async-storage/async-storage@1.24.0)(@tanstack/react-query@5.50.1(react@18.3.1))(bs58@6.0.0)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.4.1(supports-color@9.4.0))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(supports-color@9.4.0)(tslib@2.8.1)(utf-8-validate@5.0.10)(viem@2.21.48(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10))(wagmi@2.12.33(@react-native-async-storage/async-storage@1.24.0)(@tanstack/query-core@5.50.1)(@tanstack/react-query@5.50.1(react@18.3.1))(@types/react@18.3.12)(bufferutil@4.0.8)(encoding@0.1.13)(ioredis@5.4.1(supports-color@9.4.0))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(supports-color@9.4.0)(typescript@5.5.4)(utf-8-validate@5.0.10)(viem@2.21.48(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)))': dependencies: '@metamask/jazzicon': 2.0.0 '@solana/wallet-adapter-react': 0.15.35(@solana/web3.js@1.95.4(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10))(bs58@6.0.0)(react@18.3.1) diff --git a/packages/canonical-bridge-widget/CHANGELOG.md b/packages/canonical-bridge-widget/CHANGELOG.md index 7b1c8cce..ef3cbadf 100644 --- a/packages/canonical-bridge-widget/CHANGELOG.md +++ b/packages/canonical-bridge-widget/CHANGELOG.md @@ -1,11 +1,5 @@ # @bnb-chain/canonical-bridge-widget -## 0.5.17 - -### Patch Changes - -- 2179e93: feat: Send confirm popup - ## 0.5.17-alpha.0 ### Patch Changes diff --git a/packages/canonical-bridge-widget/package.json b/packages/canonical-bridge-widget/package.json index 8344737a..7f6b0a8a 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.17", + "version": "0.5.17-alpha.0", "description": "canonical bridge widget", "author": "bnb-chain", "private": false, diff --git a/packages/canonical-bridge-widget/src/modules/wallet/hooks/useEvmSwitchChain.tsx b/packages/canonical-bridge-widget/src/modules/wallet/hooks/useEvmSwitchChain.tsx index 6fbd9ed2..5703a8d6 100644 --- a/packages/canonical-bridge-widget/src/modules/wallet/hooks/useEvmSwitchChain.tsx +++ b/packages/canonical-bridge-widget/src/modules/wallet/hooks/useEvmSwitchChain.tsx @@ -36,8 +36,7 @@ export function useEvmSwitchChain(props?: UseEvmSwitchChainProps) { connector?.id === 'walletConnect' || connector?.id === 'trust' || connector?.id === 'binanceWeb3Wallet' || - connector?.id === 'BinanceW3WSDK' || - connector?.id === 'binanceWallet' + connector?.id === 'BinanceW3WSDK' ) { if ( err?.message?.includes('The JSON sent is not a valid Request object') ||