From 8ddf5e63159ba606379173ae9edd77d82c30bd99 Mon Sep 17 00:00:00 2001 From: "kean.yang" Date: Wed, 25 Oct 2023 23:29:11 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9Aupdate=20the=20Wallet=20name=20fro?= =?UTF-8?q?m=20bitget=20to=20Bitget=20Wallet=20(#1967)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat:update the Wallet name from bitget to Bitget Wallet * feat: Modify the wallet icon format from the original base64 to svg * Update packages/bitget-wallet/package.json * Update docs/src/routes/docs/[...4]wallets/[...2]bitget/+page.md * Update docs/src/routes/docs/[...4]wallets/[...2]bitget/+page.md * Revert folder name change * Bump bitget and bitkeep package versions * feat:add a declaration and modify the bitkeep documentation that @web3-onboard/bitkeep is deprecated, and the linked wallet uses @web3-onboard/bitget * Revert removal of install and usage docs, add warning to docs and readme --------- Co-authored-by: kean Co-authored-by: Adam Carpenter --- .../docs/[...4]wallets/[...3]bitkeep/+page.md | 4 +++ packages/bitget/package.json | 6 ++-- packages/bitget/src/index.ts | 32 +++++++++---------- packages/bitkeep/README.md | 3 ++ packages/bitkeep/package.json | 6 ++-- packages/bitkeep/src/index.ts | 4 +-- packages/demo/package.json | 2 +- yarn.lock | 8 ++--- 8 files changed, 36 insertions(+), 29 deletions(-) diff --git a/docs/src/routes/docs/[...4]wallets/[...3]bitkeep/+page.md b/docs/src/routes/docs/[...4]wallets/[...3]bitkeep/+page.md index e13da46c5..e0b9bddbe 100644 --- a/docs/src/routes/docs/[...4]wallets/[...3]bitkeep/+page.md +++ b/docs/src/routes/docs/[...4]wallets/[...3]bitkeep/+page.md @@ -4,6 +4,10 @@ title: BitKeep # {$frontmatter.title} +:::admonition type=warning +_Wallet module for connecting Bitkeep to web3-onboard is now deprecated due to company rebranding. Please use [@web3-onboard/bitget](../../wallets/bitget.md)_ +::: + ## Wallet module for connecting BitKeep Wallet through web3-onboard BitKeep Wallet SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications. diff --git a/packages/bitget/package.json b/packages/bitget/package.json index d31186aeb..95eabf160 100644 --- a/packages/bitget/package.json +++ b/packages/bitget/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/bitget", - "version": "2.0.0", + "version": "2.0.1-alpha.1", "description": "bitget-wallet SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", "keywords": [ "Ethereum", @@ -33,7 +33,7 @@ "Crypto", "Crypto Wallet", "Enkrypt", - "bitgetWallet" + "Bitget Wallet" ], "repository": { "type": "git", @@ -61,7 +61,7 @@ "typescript": "^4.5.5" }, "dependencies": { - "@bitget-wallet/web3-sdk": "^0.0.6", + "@bitget-wallet/web3-sdk": "^0.0.8", "@web3-onboard/common": "^2.3.3" } } diff --git a/packages/bitget/src/index.ts b/packages/bitget/src/index.ts index 27efed8a2..209a065c4 100644 --- a/packages/bitget/src/index.ts +++ b/packages/bitget/src/index.ts @@ -1,31 +1,31 @@ import type { WalletInit, EIP1193Provider } from '@web3-onboard/common' -let bitgetDependencies: any = null -let bitgetAdapter: any = null +let bitgetWalletDependencies: any = null +let bitgetWalletAdapter: any = null -const loadBitgetDependencies = async (getAdapter?: boolean) => { - if (!bitgetDependencies) { - bitgetDependencies = await import('@bitget-wallet/web3-sdk') +const loadBitgetWalletDependencies = async (getAdapter?: boolean) => { + if (!bitgetWalletDependencies) { + bitgetWalletDependencies = await import('@bitget-wallet/web3-sdk') } - if (getAdapter && !bitgetAdapter) { - bitgetAdapter = new bitgetDependencies.LegacyEip1193Adapter() - return bitgetAdapter + if (getAdapter && !bitgetWalletAdapter) { + bitgetWalletAdapter = new bitgetWalletDependencies.LegacyEip1193Adapter() + return bitgetWalletAdapter } if (getAdapter) { - return bitgetAdapter + return bitgetWalletAdapter } - return bitgetDependencies + return bitgetWalletDependencies } -function bitget(): WalletInit { +function bitgetWallet(): WalletInit { if (typeof window === 'undefined') return () => null return () => { return { - label: 'Bitget', + label: 'Bitget Wallet', getIcon: async () => { - const sdkAdapter = await loadBitgetDependencies(true) - return sdkAdapter.getLogo() + const { WalletInfo } = await loadBitgetWalletDependencies() + return WalletInfo.logolist.svg[256]; }, getInterface: async () => { const { @@ -33,7 +33,7 @@ function bitget(): WalletInit { getIsInstall, getDownload, installWalletMessage - } = await loadBitgetDependencies() + } = await loadBitgetWalletDependencies() let provider: EIP1193Provider if (getIsInstall()) { @@ -48,4 +48,4 @@ function bitget(): WalletInit { } } -export default bitget +export default bitgetWallet diff --git a/packages/bitkeep/README.md b/packages/bitkeep/README.md index 8de401043..5bf012de6 100644 --- a/packages/bitkeep/README.md +++ b/packages/bitkeep/README.md @@ -1,5 +1,8 @@ # @web3-onboard/bitkeep +## (Deprecated) Wallet module for connecting Bitkeep to web3-onboard +_Use [@web3-onboard/bitget](https://www.npmjs.com/package/@web3-onboard/bitget)_ + ## Wallet module for connecting Bitkeep Wallet through web3-onboard Bitkeep Wallet SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications. diff --git a/packages/bitkeep/package.json b/packages/bitkeep/package.json index 083ffd69b..2ea099a20 100644 --- a/packages/bitkeep/package.json +++ b/packages/bitkeep/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/bitkeep", - "version": "2.0.0", + "version": "2.0.1-alpha.1", "description": "Bitkeep Wallet SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", "keywords": [ "Ethereum", @@ -33,7 +33,7 @@ "Crypto", "Crypto Wallet", "Enkrypt", - "bitkeep" + "Bitget Wallet" ], "repository": { "type": "git", @@ -61,7 +61,7 @@ "typescript": "^4.5.5" }, "dependencies": { - "@bitget-wallet/web3-sdk": "^0.0.6", + "@bitget-wallet/web3-sdk": "^0.0.8", "@web3-onboard/common": "^2.3.3" } } diff --git a/packages/bitkeep/src/index.ts b/packages/bitkeep/src/index.ts index 681408296..3209532e1 100644 --- a/packages/bitkeep/src/index.ts +++ b/packages/bitkeep/src/index.ts @@ -24,8 +24,8 @@ function bitKeep(): WalletInit { return { label: 'BitKeep', getIcon: async () => { - const sdkAdapter = await loadBitKeepDependencies(true) - return sdkAdapter.getLogo() + const { WalletInfo } = await loadBitKeepDependencies(); + return WalletInfo.logolist.svg[256]; }, getInterface: async () => { const { diff --git a/packages/demo/package.json b/packages/demo/package.json index 9fa5879d0..31ecc1621 100644 --- a/packages/demo/package.json +++ b/packages/demo/package.json @@ -28,7 +28,7 @@ "@safe-global/safe-apps-provider": "^0.18.0", "@safe-global/safe-apps-sdk": "^8.1.0", "@web3-onboard/arcana-auth": "^2.0.0", - "@web3-onboard/bitget": "2.0.0", + "@web3-onboard/bitget": "2.0.1-alpha.1", "@web3-onboard/blocto": "2.0.0", "@web3-onboard/cede-store": "^2.1.0", "@web3-onboard/coinbase": "^2.2.6", diff --git a/yarn.lock b/yarn.lock index 5ea4c2d56..cec66a0d6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -426,10 +426,10 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" -"@bitget-wallet/web3-sdk@^0.0.6": - version "0.0.6" - resolved "https://registry.yarnpkg.com/@bitget-wallet/web3-sdk/-/web3-sdk-0.0.6.tgz#f30f7fbdeb804ddc98b175ed977340bc856011ed" - integrity sha512-UfMxJGmIAyqJBIY90nS1IrhFZvOzAvvcPt2/QhsfRQBYya8PoIwXEBofIfFeMgyVD00E7oq130DheAwFUduadA== +"@bitget-wallet/web3-sdk@^0.0.8": + version "0.0.8" + resolved "https://registry.yarnpkg.com/@bitget-wallet/web3-sdk/-/web3-sdk-0.0.8.tgz#1510b0b379654ff0de5e10ae19bef93fa86e46c3" + integrity sha512-WFk6URUxTCukKrU3YpTdWTCScrj6/wwd/0O7eSANeQl1KDbDs+yj/fAkN1Wy6ebI3NMcW6sqN9mrmfwz53dPMQ== dependencies: "@metamask/safe-event-emitter" "^3.0.0" "@solana/web3.js" "^1.78.0"