Skip to content

Commit d31ee6e

Browse files
feature: Integrating GameStop Wallet into onboard (#1073)
* Integrating GameStop Wallet into onboard * updating semantic version and adding "GameStop" keyword
1 parent 1f563bb commit d31ee6e

File tree

5 files changed

+32
-6
lines changed

5 files changed

+32
-6
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
"Mempool",
3434
"pending",
3535
"confirmed",
36-
"Injected Wallet"
36+
"Injected Wallet",
37+
"GameStop"
3738
],
3839
"repository": {
3940
"type": "git",

packages/injected/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/injected-wallets",
3-
"version": "2.0.13",
3+
"version": "2.0.14-alpha.1",
44
"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.",
55
"keywords": [
66
"Ethereum",
@@ -29,7 +29,8 @@
2929
"Mempool",
3030
"pending",
3131
"confirmed",
32-
"Injected Wallet"
32+
"Injected Wallet",
33+
"GameStop"
3334
],
3435
"repository": {
3536
"type": "git",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default `
2+
<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3+
<circle cx="12" cy="12" r="12" fill="black"/>
4+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.52862 9.75V15.9646C7.52862 16.4706 7.91965 16.8565 8.4254 16.8565H15.7621C16.2679 16.8565 16.6589 16.4706 16.6589 15.9646V10.7524H17.625V15.9646C17.625 16.9956 16.8045 17.8125 15.7621 17.8125H8.4254C7.38304 17.8125 6.5625 16.9956 6.5625 15.9646V9.75H7.52862Z" fill="white"/>
5+
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.5625 8.22251C6.5625 7.19176 7.38304 6.375 8.4254 6.375H15.9086V8.64657H16.1323C16.9727 8.64657 17.625 9.29631 17.625 10.1266V10.8949C17.625 11.7253 16.9727 12.375 16.1323 12.375H8.4254C7.38304 12.375 6.5625 11.5582 6.5625 10.5275V8.22251ZM14.9425 8.64657V7.33077H8.4254C7.91965 7.33077 7.52862 7.71661 7.52862 8.22251V10.5275C7.52862 11.0334 7.91965 11.4192 8.4254 11.4192H11.6107V8.64657H14.9425ZM12.5768 11.4192H16.1323C16.4361 11.4192 16.6589 11.2004 16.6589 10.8949V10.1266C16.6589 9.82115 16.4361 9.60235 16.1323 9.60235H12.5768V11.4192Z" fill="white"/>
6+
</svg>
7+
`

packages/injected/src/types.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ export enum ProviderIdentityFlag {
4242
Tally = 'isTally',
4343
BraveWallet = 'isBraveWallet',
4444
Rabby = 'isRabby',
45-
MathWallet = 'isMathWallet'
45+
MathWallet = 'isMathWallet',
46+
GameStop = 'isGamestop'
4647
}
4748

4849
export enum ProviderLabel {
@@ -77,6 +78,7 @@ export enum ProviderLabel {
7778
Tally = 'Tally Wallet',
7879
Rabby = 'Rabby',
7980
MathWallet = 'MathWallet',
81+
GameStop = 'GameStop Wallet'
8082
}
8183

8284
export interface MeetOneProvider extends ExternalProvider {
@@ -95,7 +97,8 @@ export enum InjectedNameSpace {
9597
Tally = 'tally',
9698
Web3 = 'web3',
9799
Arbitrum = 'arbitrum',
98-
XFI = 'xfi'
100+
XFI = 'xfi',
101+
GameStop = 'gamestop'
99102
}
100103

101104
export interface CustomWindow extends Window {
@@ -107,6 +110,7 @@ export interface CustomWindow extends Window {
107110
xfi: {
108111
ethereum: InjectedProvider
109112
}
113+
gamestop: InjectedProvider
110114
}
111115

112116
export type InjectedProvider = ExternalProvider &

packages/injected/src/wallets.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,18 @@ const mathwallet: InjectedWalletModule = {
500500
platforms: ['all']
501501
}
502502

503+
const gamestop: InjectedWalletModule = {
504+
label: ProviderLabel.GameStop,
505+
injectedNamespace: InjectedNameSpace.GameStop,
506+
checkProviderIdentity: ({ provider }) =>
507+
!!provider && !!provider[ProviderIdentityFlag.GameStop],
508+
getIcon: async () => (await import('./icons/gamestop.js')).default,
509+
getInterface: async () => ({
510+
provider: createEIP1193Provider(window.gamestop)
511+
}),
512+
platforms: ['desktop']
513+
}
514+
503515
const wallets = [
504516
exodus,
505517
metamask,
@@ -529,7 +541,8 @@ const wallets = [
529541
tokenary,
530542
tally,
531543
rabby,
532-
mathwallet
544+
mathwallet,
545+
gamestop
533546
]
534547

535548
export default wallets

0 commit comments

Comments
 (0)