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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"Mempool",
"pending",
"confirmed",
"Injected Wallet"
"Injected Wallet",
"GameStop"
],
"repository": {
"type": "git",
Expand Down
5 changes: 3 additions & 2 deletions 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.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",
Expand Down Expand Up @@ -29,7 +29,8 @@
"Mempool",
"pending",
"confirmed",
"Injected Wallet"
"Injected Wallet",
"GameStop"
],
"repository": {
"type": "git",
Expand Down
7 changes: 7 additions & 0 deletions packages/injected/src/icons/gamestop.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default `
<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="12" cy="12" r="12" fill="black"/>
<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"/>
<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"/>
</svg>
`
8 changes: 6 additions & 2 deletions packages/injected/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export enum ProviderIdentityFlag {
Tally = 'isTally',
BraveWallet = 'isBraveWallet',
Rabby = 'isRabby',
MathWallet = 'isMathWallet'
MathWallet = 'isMathWallet',
GameStop = 'isGamestop'
}

export enum ProviderLabel {
Expand Down Expand Up @@ -77,6 +78,7 @@ export enum ProviderLabel {
Tally = 'Tally Wallet',
Rabby = 'Rabby',
MathWallet = 'MathWallet',
GameStop = 'GameStop Wallet'
}

export interface MeetOneProvider extends ExternalProvider {
Expand All @@ -95,7 +97,8 @@ export enum InjectedNameSpace {
Tally = 'tally',
Web3 = 'web3',
Arbitrum = 'arbitrum',
XFI = 'xfi'
XFI = 'xfi',
GameStop = 'gamestop'
}

export interface CustomWindow extends Window {
Expand All @@ -107,6 +110,7 @@ export interface CustomWindow extends Window {
xfi: {
ethereum: InjectedProvider
}
gamestop: InjectedProvider
}

export type InjectedProvider = ExternalProvider &
Expand Down
15 changes: 14 additions & 1 deletion packages/injected/src/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,18 @@ const mathwallet: InjectedWalletModule = {
platforms: ['all']
}

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,
Expand Down Expand Up @@ -529,7 +541,8 @@ const wallets = [
tokenary,
tally,
rabby,
mathwallet
mathwallet,
gamestop
]

export default wallets