Skip to content

Commit

Permalink
feat:update the Wallet name from bitget to Bitget Wallet (#1967)
Browse files Browse the repository at this point in the history
* 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 <[email protected]@bitget.com>
Co-authored-by: Adam Carpenter <[email protected]>
  • Loading branch information
3 people authored Oct 25, 2023
1 parent e732f61 commit 8ddf5e6
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 29 deletions.
4 changes: 4 additions & 0 deletions docs/src/routes/docs/[...4]wallets/[...3]bitkeep/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions packages/bitget/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -33,7 +33,7 @@
"Crypto",
"Crypto Wallet",
"Enkrypt",
"bitgetWallet"
"Bitget Wallet"
],
"repository": {
"type": "git",
Expand Down Expand Up @@ -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"
}
}
32 changes: 16 additions & 16 deletions packages/bitget/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
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 {
currentProvider,
getIsInstall,
getDownload,
installWalletMessage
} = await loadBitgetDependencies()
} = await loadBitgetWalletDependencies()

let provider: EIP1193Provider
if (getIsInstall()) {
Expand All @@ -48,4 +48,4 @@ function bitget(): WalletInit {
}
}

export default bitget
export default bitgetWallet
3 changes: 3 additions & 0 deletions packages/bitkeep/README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions packages/bitkeep/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -33,7 +33,7 @@
"Crypto",
"Crypto Wallet",
"Enkrypt",
"bitkeep"
"Bitget Wallet"
],
"repository": {
"type": "git",
Expand Down Expand Up @@ -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"
}
}
4 changes: 2 additions & 2 deletions packages/bitkeep/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 8ddf5e6

Please sign in to comment.