Skip to content

Commit b2feef8

Browse files
committed
Add Frontier Wallet Package
1 parent 98a0820 commit b2feef8

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

packages/injected/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/injected-wallets",
3-
"version": "2.5.0-alpha.3",
3+
"version": "2.5.0-alpha.4",
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",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default `<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 153.42 152.94">
2+
<path d="M145.15,75.59v-58a9.29,9.29,0,0,0-9.3-9.28H77.65a2.24,2.24,0,0,1-1.56-.64l-7-7A2.24,2.24,0,0,0,67.48,0H9.31A9.29,9.29,0,0,0,0,9.27H0v58a2.16,2.16,0,0,0,.65,1.55l7,7a2.16,2.16,0,0,1,.65,1.55v58a9.29,9.29,0,0,0,9.3,9.28H75.8a2.24,2.24,0,0,1,1.56.64l7,7a2.24,2.24,0,0,0,1.56.64h58.19a9.29,9.29,0,0,0,9.31-9.27h0v-58a2.16,2.16,0,0,0-.65-1.55l-7-7A2.17,2.17,0,0,1,145.15,75.59Zm-32.3,38.55H40.65A1.68,1.68,0,0,1,39,112.47V40.53a1.68,1.68,0,0,1,1.67-1.67h72.18a1.68,1.68,0,0,1,1.67,1.67v71.94a1.68,1.68,0,0,1-1.67,1.67Z" transform="translate(0 0)"></path>
3+
</svg>
4+
`

packages/injected/src/types.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export enum ProviderIdentityFlag {
2222
Detected = 'request',
2323
Dcent = 'isDcentWallet',
2424
Exodus = 'isExodus',
25+
Frontier = 'isFrontier',
2526
Frame = 'isFrame',
2627
HuobiWallet = 'isHbWallet',
2728
HyperPay = 'isHyperPay',
@@ -67,6 +68,7 @@ export enum ProviderLabel {
6768
Detected = 'Detected Wallet',
6869
Exodus = 'Exodus',
6970
Frame = 'Frame',
71+
Frontier = 'Frontier',
7072
HuobiWallet = 'Huobi Wallet',
7173
HyperPay = 'HyperPay',
7274
ImToken = 'imToken',
@@ -119,6 +121,7 @@ export enum InjectedNameSpace {
119121
Bitski = 'Bitski',
120122
Enkrypt = 'enkrypt',
121123
Zeal = 'zeal',
124+
Frontier = 'frontier',
122125
Phantom = 'phantom'
123126
}
124127

@@ -145,6 +148,9 @@ export interface CustomWindow extends Window {
145148
ethereum: InjectedProvider
146149
}
147150
}
151+
frontier: {
152+
ethereum: InjectedProvider
153+
}
148154
phantom: {
149155
ethereum: InjectedProvider
150156
}

packages/injected/src/wallets.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,18 @@ const exodus: InjectedWalletModule = {
7474
platforms: ['all']
7575
}
7676

77+
const frontier: InjectedWalletModule = {
78+
label: ProviderLabel.Frontier,
79+
injectedNamespace: InjectedNameSpace.Frontier,
80+
checkProviderIdentity: ({ provider }) =>
81+
!!provider && !!provider[ProviderIdentityFlag.Frontier],
82+
getIcon: async () => (await import('./icons/frontier.js')).default,
83+
getInterface: async () => ({
84+
provider: createEIP1193Provider(window.frontier.ethereum)
85+
}),
86+
platforms: ['all']
87+
}
88+
7789
const brave: InjectedWalletModule = {
7890
label: ProviderLabel.Brave,
7991
injectedNamespace: InjectedNameSpace.Ethereum,
@@ -656,6 +668,7 @@ const phantom: InjectedWalletModule = {
656668
const wallets = [
657669
zeal,
658670
exodus,
671+
frontier,
659672
metamask,
660673
binance,
661674
coinbase,

0 commit comments

Comments
 (0)