Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ package-lock.json
.rpt2_cache
.vscode
yarn-error.log
.env
.env
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ const injected = injectedModule({
- MathWallet - _Desktop & Mobile_
- Gamestop - _Desktop_
- Bitkeep - _Desktop & Mobile_
- BitGet Wallet - _Desktop & Mobile_
- Sequence - _Desktop & Mobile_
- Core - _Desktop_
- Bitski - _Desktop & Mobile_
Expand Down
4 changes: 3 additions & 1 deletion examples/with-vanilla-js/src/onboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ import Onboard from '@web3-onboard/core'
import injectedWalletsModule from '@web3-onboard/injected-wallets'
import walletConnectModule from '@web3-onboard/walletconnect'
import coinbaseModule from '@web3-onboard/coinbase'
import bitgetModule from '@web3-onboard/bitget'

const injected = injectedWalletsModule()
const walletConnect = walletConnectModule({})
const coinbaseWallet = coinbaseModule()
const bitgetWallet = bitgetModule()

const wallets = [injected, walletConnect, coinbaseWallet]
const wallets = [injected, walletConnect, bitgetWallet, coinbaseWallet]

const chains = [
{
Expand Down
7 changes: 5 additions & 2 deletions packages/bitkeep/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@ const loadBitKeepDependencies = async (getAdapter?: boolean) => {
return bitKeepDependencies
}

/**
* @deprecated Please use `@web3-onboard/bitget` instead.
*/
function bitKeep(): WalletInit {
if (typeof window === 'undefined') return () => null

return () => {
return {
label: 'BitKeep',
getIcon: async () => {
const { WalletInfo } = await loadBitKeepDependencies();
return WalletInfo.logolist.svg[256];
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 @@ -41,7 +41,7 @@
"@web3-onboard/gas": "^2.1.7",
"@web3-onboard/gnosis": "^2.1.10",
"@web3-onboard/infinity-wallet": "^2.0.3",
"@web3-onboard/injected-wallets": "^2.10.8",
"@web3-onboard/injected-wallets": "^2.10.9-alpha.1",
"@web3-onboard/keepkey": "^2.3.7",
"@web3-onboard/keystone": "^2.3.7",
"@web3-onboard/ledger": "^2.5.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/injected/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ console.log(connectedWallets)
- Rabby - _Desktop_
- MathWallet - _Desktop & Mobile_
- Gamestop - _Desktop_
- Bitkeep - _Desktop & Mobile_
- Bitget - _Desktop & Mobile_
- Sequence - _Desktop & Mobile_
- Core - _Desktop_
- Bitski - _Desktop & Mobile_
Expand Down
2 changes: 1 addition & 1 deletion packages/injected/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/injected-wallets",
"version": "2.10.8",
"version": "2.10.9-alpha.1",
"description": "Injected wallet module for connecting browser extension and mobile wallets to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised 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
2 changes: 1 addition & 1 deletion packages/injected/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const WALLET_NAMES: { [key: string]: string } = {
detected: 'Detected Wallet',
meetone: 'MeetOne',
frame: 'Frame',
bitkeep: 'BitKeep',
bitget: 'Bitget Wallet',
sequence: 'Sequence',
core: 'Core',
enkrypt: 'Enkrypt',
Expand Down
1 change: 1 addition & 0 deletions packages/injected/src/icons/bitget.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default `<svg width="256" height="256" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_2035_1106)"><rect width="256" height="256" fill="#54FFF5"/><g filter="url(#filter0_f_2035_1106)"><path d="M13.4806 198.605C-29.3276 319.043 199.661 285.027 319.507 252.964C442.165 212.259 357.386 32.8269 269.415 28.8558C181.443 24.8847 280.322 111.824 205.595 136.656C130.868 161.487 66.9907 48.0583 13.4806 198.605Z" fill="white"/></g><g filter="url(#filter1_f_2035_1106)"><path d="M85.5118 -45.8225C63.0562 -107.176 -16.9189 -23.9953 -54.0995 25.2643C-89.5652 78.8479 3.00937 125.152 39.3208 100.037C75.6323 74.9227 7.77448 70.0363 29.3708 37.3785C50.9671 4.72076 113.581 30.8695 85.5118 -45.8225Z" fill="#00FFF0" fill-opacity="0.67"/></g><g filter="url(#filter2_f_2035_1106)"><path d="M96.4796 225.424C65.8502 122.363 -66.0818 176.637 -128.219 216.657C-187.99 264.042 -46.0711 400.348 12.8725 393.376C71.8161 386.403 -34.4118 327.065 1.98702 298.17C38.3858 269.276 134.766 354.249 96.4796 225.424Z" fill="#9D81FF"/></g><g filter="url(#filter3_f_2035_1106)"><path d="M282.12 -107.353C216.047 -186.031 121.463 -120.97 82.4296 -78.6047C48.2739 -30.6446 224.275 57.2312 273.121 42.1714C321.968 27.1115 206.512 -4.05038 227.297 -33.2879C248.082 -62.5255 364.712 -9.00566 282.12 -107.353Z" fill="#4D94FF"/></g><path fill-rule="evenodd" clip-rule="evenodd" d="M93.189 152.836H136.674L87.2086 103.051L137.31 53.2663L150.955 40H105.819L48.3359 97.7773C45.4349 100.689 45.4498 105.402 48.3656 108.299L93.189 152.836ZM119.33 103.168H118.995L119.326 103.164L119.33 103.168ZM119.33 103.168L168.791 152.949L118.69 202.734L105.045 216H150.18L207.664 158.226C210.565 155.314 210.55 150.602 207.634 147.705L162.811 103.168H119.33Z" fill="black"/></g><defs><filter id="filter0_f_2035_1106" x="-90.2411" y="-69.7369" width="569.558" height="451.431" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur stdDeviation="49.2308" result="effect1_foregroundBlur_2035_1106"/></filter><filter id="filter1_f_2035_1106" x="-160.511" y="-165.987" width="351.596" height="371.507" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur stdDeviation="49.2308" result="effect1_foregroundBlur_2035_1106"/></filter><filter id="filter2_f_2035_1106" x="-241.078" y="67.642" width="444.851" height="424.452" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur stdDeviation="49.2308" result="effect1_foregroundBlur_2035_1106"/></filter><filter id="filter3_f_2035_1106" x="-20.3968" y="-242.758" width="430.191" height="385.105" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur stdDeviation="49.2308" result="effect1_foregroundBlur_2035_1106"/></filter><clipPath id="clip0_2035_1106"><rect width="256" height="256" fill="white"/></clipPath></defs></svg>`
5 changes: 0 additions & 5 deletions packages/injected/src/icons/bitkeep.ts

This file was deleted.

4 changes: 1 addition & 3 deletions packages/injected/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@ function injected(options?: InjectedWalletOptions): WalletInit {
getInterface
}))
// default sort by alphabetical
.sort((a, b) =>
a.label < b.label ? -1 : a.label > b.label ? 1 : 0
)
.sort((a, b) => (a.label < b.label ? -1 : a.label > b.label ? 1 : 0))

return sort ? sort(formattedWallets) : formattedWallets
}
Expand Down
8 changes: 4 additions & 4 deletions packages/injected/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export enum ProviderIdentityFlag {
Rabby = 'isRabby',
MathWallet = 'isMathWallet',
GameStop = 'isGamestop',
BitKeep = 'isBitKeep',
Bitget = 'isBitKeep',
Sequence = 'isSequence',
Core = 'isAvalanche',
Opera = 'isOpera',
Expand Down Expand Up @@ -80,7 +80,7 @@ export enum ProviderIdentityFlag {
*/
export enum ProviderExternalUrl {
Binance = 'https://www.bnbchain.org/ru/blog/binance-extension-wallet/',
BitKeep = 'https://web3.bitget.com/en/wallet-download',
Bitget = 'https://web3.bitget.com/en/wallet-download',
Coinbase = 'https://www.coinbase.com/wallet/downloads',
MetaMask = 'https://metamask.io/download/',
OKXWallet = 'https://okx.com/download',
Expand Down Expand Up @@ -133,7 +133,7 @@ export enum ProviderLabel {
Rabby = 'Rabby Wallet',
MathWallet = 'MathWallet',
GameStop = 'GameStop Wallet',
BitKeep = 'BitKeep',
Bitget = 'Bitget Wallet',
Sequence = 'Sequence',
Core = 'Core',
Enkrypt = 'Enkrypt',
Expand Down Expand Up @@ -172,7 +172,7 @@ export enum InjectedNameSpace {
Arbitrum = 'arbitrum',
XFI = 'xfi',
GameStop = 'gamestop',
BitKeep = 'bitkeep',
Bitget = 'bitkeep',
Avalanche = 'avalanche',
Bitski = 'Bitski',
Enkrypt = 'enkrypt',
Expand Down
17 changes: 8 additions & 9 deletions packages/injected/src/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -598,17 +598,17 @@ const gamestop: InjectedWalletModule = {
platforms: ['desktop']
}

const bitkeep: InjectedWalletModule = {
label: ProviderLabel.BitKeep,
injectedNamespace: InjectedNameSpace.BitKeep,
const bitget: InjectedWalletModule = {
label: ProviderLabel.Bitget,
injectedNamespace: InjectedNameSpace.Bitget,
checkProviderIdentity: ({ provider }) =>
!!provider && !!provider['ethereum'][ProviderIdentityFlag.BitKeep],
getIcon: async () => (await import('./icons/bitkeep.js')).default,
!!provider && !!provider['ethereum'][ProviderIdentityFlag.Bitget],
getIcon: async () => (await import('./icons/bitget.js')).default,
getInterface: async () => ({
provider: window.bitkeep && window.bitkeep.ethereum
}),
platforms: ['all'],
externalUrl: ProviderExternalUrl.BitKeep
externalUrl: ProviderExternalUrl.Bitget
}

const sequence: InjectedWalletModule = {
Expand Down Expand Up @@ -817,8 +817,7 @@ const fordefi: InjectedWalletModule = {
label: ProviderLabel.Fordefi,
injectedNamespace: InjectedNameSpace.Ethereum,
checkProviderIdentity: ({ provider }) =>
!!provider &&
!!provider[ProviderIdentityFlag.Fordefi],
!!provider && !!provider[ProviderIdentityFlag.Fordefi],
getIcon: async () => (await import('./icons/fordefi.js')).default,
getInterface: getInjectedInterface(ProviderIdentityFlag.Fordefi, true),
platforms: ['desktop']
Expand Down Expand Up @@ -896,6 +895,7 @@ const wallets = [
alphawallet,
apexwallet,
atoken,
bitget,
bitpie,
blockwallet,
brave,
Expand All @@ -916,7 +916,6 @@ const wallets = [
rabby,
mathwallet,
gamestop,
bitkeep,
sequence,
core,
bitski,
Expand Down