diff --git a/packages/injected/package.json b/packages/injected/package.json index 1c7e48602..f136d1595 100644 --- a/packages/injected/package.json +++ b/packages/injected/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/injected-wallets", - "version": "2.10.9", + "version": "2.10.10-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", @@ -34,7 +34,8 @@ "Phantom", "DeFi Wallet", "Fordefi", - "Coin98 Wallet" + "Coin98 Wallet", + "FoxWallet" ], "repository": { "type": "git", diff --git a/packages/injected/src/constants.ts b/packages/injected/src/constants.ts index fdcfac8b2..bb1eda830 100644 --- a/packages/injected/src/constants.ts +++ b/packages/injected/src/constants.ts @@ -32,5 +32,6 @@ export const WALLET_NAMES: { [key: string]: string } = { roninWallet: 'Ronin Wallet', coin98wallet: 'Coin98 Wallet', SubWallet: 'SubWallet', - kayros: 'Kayros' + kayros: 'Kayros', + foxwallet: "FoxWallet" } diff --git a/packages/injected/src/icons/foxwallet.ts b/packages/injected/src/icons/foxwallet.ts new file mode 100644 index 000000000..c71cf4fc2 --- /dev/null +++ b/packages/injected/src/icons/foxwallet.ts @@ -0,0 +1,14 @@ +export default ` + + + + + + + + + + + + +` diff --git a/packages/injected/src/types.ts b/packages/injected/src/types.ts index 0d4c377e0..c8bae9bda 100644 --- a/packages/injected/src/types.ts +++ b/packages/injected/src/types.ts @@ -67,7 +67,8 @@ export enum ProviderIdentityFlag { Fordefi = 'isFordefi', Coin98Wallet = 'isCoin98', SubWallet = 'isSubWallet', - Kayros = 'isKayros' + Kayros = 'isKayros', + FoxWallet = 'isFoxWallet' } /** @@ -92,7 +93,8 @@ export enum ProviderExternalUrl { Coin98Wallet = 'https://coin98.com/wallet/', SubWallet = 'https://www.subwallet.app/', Kayros = 'https://www.kayros.games/wallet/', - XDEFI = 'https://xdefi.io/' + XDEFI = 'https://xdefi.io/', + FoxWallet = 'https://foxwallet.com/download' } export enum ProviderLabel { @@ -151,7 +153,8 @@ export enum ProviderLabel { RoninWallet = 'Ronin Wallet', Coin98Wallet = 'Coin98 Wallet', SubWallet = 'SubWallet', - Kayros = 'Kayros' + Kayros = 'Kayros', + FoxWallet = 'FoxWallet' } export interface MeetOneProvider extends ExternalProvider { @@ -188,7 +191,8 @@ export enum InjectedNameSpace { RoninWallet = 'ronin', Coin98Wallet = 'coin98', SubWallet = 'SubWallet', - Kayros = 'kayros' + Kayros = 'kayros', + FoxWallet = 'foxwallet' } export interface CustomWindow extends Window { @@ -238,6 +242,7 @@ export interface CustomWindow extends Window { provider: InjectedProvider } kayros: InjectedProvider + foxwallet: InjectedProvider } export type InjectedProvider = ExternalProvider & diff --git a/packages/injected/src/wallets.ts b/packages/injected/src/wallets.ts index 6fe4c7189..3c797737a 100644 --- a/packages/injected/src/wallets.ts +++ b/packages/injected/src/wallets.ts @@ -880,6 +880,18 @@ const kayros: InjectedWalletModule = { platforms: ['desktop'] } +const foxwallet: InjectedWalletModule = { + label: ProviderLabel.FoxWallet, + injectedNamespace: InjectedNameSpace.FoxWallet, + checkProviderIdentity: ({ provider }) => + !!provider && !!provider[ProviderIdentityFlag.FoxWallet], + getIcon: async () => (await import('./icons/foxwallet.js')).default, + getInterface: async () => ({ + provider: createEIP1193Provider(window.foxwallet) + }), + platforms: ['mobile'] +} + const wallets = [ zeal, exodus, @@ -934,7 +946,8 @@ const wallets = [ ronin, coin98wallet, subwallet, - kayros + kayros, + foxwallet ] export default wallets