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

Feat: Update the Wallet name from bitget to Bitget Wallet #1967

Merged
merged 10 commits into from
Oct 25, 2023
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',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line will update the client naming of the wallet.
You can probably revert the changes to add Wallet to variable names as it will be implied

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Thanks for reply

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
Loading