From 9e852116336043b26ba10afec9ba339ec62424f6 Mon Sep 17 00:00:00 2001 From: Tyler Manser Date: Thu, 16 Jun 2022 13:08:44 -0600 Subject: [PATCH 1/2] Integrating GameStop Wallet into onboard --- packages/injected/package.json | 2 +- packages/injected/src/icons/gamestop.ts | 7 +++++++ packages/injected/src/types.ts | 10 +++++++--- packages/injected/src/wallets.ts | 15 ++++++++++++++- 4 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 packages/injected/src/icons/gamestop.ts diff --git a/packages/injected/package.json b/packages/injected/package.json index e8c93e15c..5d27ce79c 100644 --- a/packages/injected/package.json +++ b/packages/injected/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/injected-wallets", - "version": "2.0.9", + "version": "2.0.10-alpha.1", "description": "Injected wallets module for web3-onboard", "module": "dist/index.js", "browser": "dist/index.js", diff --git a/packages/injected/src/icons/gamestop.ts b/packages/injected/src/icons/gamestop.ts new file mode 100644 index 000000000..e59687a0b --- /dev/null +++ b/packages/injected/src/icons/gamestop.ts @@ -0,0 +1,7 @@ +export default ` + + + + + +` \ No newline at end of file diff --git a/packages/injected/src/types.ts b/packages/injected/src/types.ts index ede008038..0928bcc5a 100644 --- a/packages/injected/src/types.ts +++ b/packages/injected/src/types.ts @@ -40,7 +40,8 @@ export enum ProviderIdentityFlag { OneInch = 'isOneInchIOSWallet', Tokenary = 'isTokenary', Tally = 'isTally', - BraveWallet = 'isBraveWallet' + BraveWallet = 'isBraveWallet', + GameStop = 'isGamestop' } export enum ProviderLabel { @@ -72,7 +73,8 @@ export enum ProviderLabel { XDEFI = 'XDEFI Wallet', OneInch = '1inch Wallet', Tokenary = 'Tokenary Wallet', - Tally = 'Tally Wallet' + Tally = 'Tally Wallet', + GameStop = 'GameStop Wallet' } export interface MeetOneProvider extends ExternalProvider { @@ -91,7 +93,8 @@ export enum InjectedNameSpace { Tally = 'tally', Web3 = 'web3', Arbitrum = 'arbitrum', - XFI = 'xfi' + XFI = 'xfi', + GameStop = 'gamestop' } export interface CustomWindow extends Window { @@ -103,6 +106,7 @@ export interface CustomWindow extends Window { xfi: { ethereum: InjectedProvider } + gamestop: InjectedProvider } export type InjectedProvider = ExternalProvider & diff --git a/packages/injected/src/wallets.ts b/packages/injected/src/wallets.ts index db2a122cb..b58cc0892 100644 --- a/packages/injected/src/wallets.ts +++ b/packages/injected/src/wallets.ts @@ -473,6 +473,18 @@ const tally: InjectedWalletModule = { platforms: ['desktop'] } +const gamestop: InjectedWalletModule = { + label: ProviderLabel.GameStop, + injectedNamespace: InjectedNameSpace.GameStop, + checkProviderIdentity: ({ provider }) => + !!provider && !!provider[ProviderIdentityFlag.GameStop], + getIcon: async () => (await import('./icons/gamestop.js')).default, + getInterface: async () => ({ + provider: createEIP1193Provider(window.gamestop) + }), + platforms: ['desktop'] +} + const wallets = [ exodus, metamask, @@ -500,7 +512,8 @@ const wallets = [ xdefi, oneInch, tokenary, - tally + tally, + gamestop ] export default wallets From 5c365f113a5cd759bb57fe94f0f5cb9e6cbcb325 Mon Sep 17 00:00:00 2001 From: Tyler Manser Date: Thu, 14 Jul 2022 08:57:50 -0600 Subject: [PATCH 2/2] updating semantic version and adding "GameStop" keyword --- package.json | 3 ++- packages/injected/package.json | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 0295e0de7..278f89937 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,8 @@ "Mempool", "pending", "confirmed", - "Injected Wallet" + "Injected Wallet", + "GameStop" ], "repository": { "type": "git", diff --git a/packages/injected/package.json b/packages/injected/package.json index a946d7858..a8616db01 100644 --- a/packages/injected/package.json +++ b/packages/injected/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/injected-wallets", - "version": "2.0.13", + "version": "2.0.14-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", @@ -29,7 +29,8 @@ "Mempool", "pending", "confirmed", - "Injected Wallet" + "Injected Wallet", + "GameStop" ], "repository": { "type": "git",