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
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@web3-onboard/fortmatic": "^2.0.14",
"@web3-onboard/gas": "^2.1.4",
"@web3-onboard/gnosis": "^2.1.5",
"@web3-onboard/injected-wallets": "^2.4.0",
"@web3-onboard/injected-wallets": "^2.6.1-alpha.1",
"@web3-onboard/keepkey": "^2.3.2",
"@web3-onboard/keystone": "^2.3.2",
"@web3-onboard/ledger": "^2.4.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-nextjs-13/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@web3-onboard/dcent": "^2.2.1",
"@web3-onboard/fortmatic": "^2.0.14",
"@web3-onboard/gnosis": "^2.1.3",
"@web3-onboard/injected-wallets": "^2.2.4",
"@web3-onboard/injected-wallets": "^2.6.1-alpha.1",
"@web3-onboard/keepkey": "^2.3.1",
"@web3-onboard/keystone": "^2.3.1",
"@web3-onboard/ledger": "^2.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-vite-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@web3-onboard/dcent": "^2.2.1",
"@web3-onboard/fortmatic": "^2.0.14",
"@web3-onboard/gnosis": "^2.1.5",
"@web3-onboard/injected-wallets": "^2.2.4",
"@web3-onboard/injected-wallets": "^2.6.1-alpha.1",
"@web3-onboard/keepkey": "^2.3.1",
"@web3-onboard/keystone": "^2.3.1",
"@web3-onboard/ledger": "^2.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-vuejs-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"serve": "vite preview"
},
"dependencies": {
"@web3-onboard/injected-wallets": "^2.2.0",
"@web3-onboard/injected-wallets": "^2.6.1-alpha.1",
"@web3-onboard/vue": "^2.3.1",
"vue": "^2.6.12",
"vue-template-compiler": "^2.7.10"
Expand Down
2 changes: 1 addition & 1 deletion examples/with-vuejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
},
"dependencies": {
"@web3-onboard/injected-wallets": "^2.0.15",
"@web3-onboard/injected-wallets": "^2.6.1-alpha.1",
"@web3-onboard/vue": "^2.3.1",
"pinia": "^2.0.16",
"vue": "^3.2.37",
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@web3-onboard/keepkey": "^2.3.3-alpha.2",
"@web3-onboard/keystone": "^2.3.3-alpha.2",
"@web3-onboard/ledger": "^2.4.2-alpha.1",
"@web3-onboard/injected-wallets": "^2.6.0",
"@web3-onboard/injected-wallets": "^2.6.1-alpha.1",
"@web3-onboard/magic": "^2.1.3",
"@web3-onboard/phantom": "^2.0.0-alpha.1",
"@web3-onboard/portis": "^2.1.3",
Expand Down
2 changes: 1 addition & 1 deletion 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.6.0",
"version": "2.6.1-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
3 changes: 2 additions & 1 deletion packages/injected/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ export const WALLET_NAMES: { [key: string]: string } = {
core: 'Core',
enkrypt: 'Enkrypt',
frontier: 'Frontier',
zerion: 'Zerion'
zerion: 'Zerion',
rainbow: 'Rainbow'
}
66 changes: 66 additions & 0 deletions packages/injected/src/icons/rainbow.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
export default `
<svg width="100%" height="100%" viewBox="0 0 120 120" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1_19)">
<mask id="mask0_1_19" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="120" height="120">
<circle cx="60" cy="60" r="60" fill="#D9D9D9"/>
</mask>
<g mask="url(#mask0_1_19)">
<rect width="120" height="120" fill="url(#paint0_linear_1_19)"/>
</g>
<path d="M26.6667 41.6667H31.6667C57.44 41.6667 78.3333 62.56 78.3333 88.3333V93.3333H88.3333C91.0948 93.3333 93.3333 91.0947 93.3333 88.3333C93.3333 54.2758 65.7242 26.6667 31.6667 26.6667C28.9052 26.6667 26.6667 28.9052 26.6667 31.6667V41.6667Z" fill="url(#paint1_radial_1_19)"/>
<path d="M80 88.3333H93.3333C93.3333 91.0948 91.0947 93.3333 88.3333 93.3333H80V88.3333Z" fill="url(#paint2_linear_1_19)"/>
<path d="M31.6667 26.6667L31.6667 40H26.6667L26.6667 31.6667C26.6667 28.9052 28.9052 26.6667 31.6667 26.6667Z" fill="url(#paint3_linear_1_19)"/>
<path d="M26.6666 40H31.6666C58.3604 40 80 61.6396 80 88.3333V93.3333H65V88.3333C65 69.9238 50.0761 55 31.6666 55H26.6666V40Z" fill="url(#paint4_radial_1_19)"/>
<path d="M66.6666 88.3333H80V93.3333H66.6666V88.3333Z" fill="url(#paint5_linear_1_19)"/>
<path d="M26.6666 53.3333L26.6666 40L31.6666 40L31.6666 53.3333H26.6666Z" fill="url(#paint6_linear_1_19)"/>
<path d="M26.6666 61.6667C26.6666 64.4281 28.9052 66.6667 31.6666 66.6667C43.6328 66.6667 53.3333 76.3672 53.3333 88.3333C53.3333 91.0948 55.5719 93.3333 58.3333 93.3333H66.6666V88.3333C66.6666 69.0034 50.9966 53.3333 31.6666 53.3333H26.6666V61.6667Z" fill="url(#paint7_radial_1_19)"/>
<path d="M53.3333 88.3333H66.6666V93.3333H58.3333C55.5719 93.3333 53.3333 91.0948 53.3333 88.3333Z" fill="url(#paint8_radial_1_19)"/>
<path d="M31.6666 66.6667C28.9052 66.6667 26.6666 64.4281 26.6666 61.6667L26.6666 53.3333L31.6666 53.3333L31.6666 66.6667Z" fill="url(#paint9_radial_1_19)"/>
</g>
<defs>
<linearGradient id="paint0_linear_1_19" x1="60" y1="0" x2="60" y2="120" gradientUnits="userSpaceOnUse">
<stop stop-color="#174299"/>
<stop offset="1" stop-color="#001E59"/>
</linearGradient>
<radialGradient id="paint1_radial_1_19" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(31.6667 88.3333) rotate(-90) scale(61.6667)">
<stop offset="0.770277" stop-color="#FF4000"/>
<stop offset="1" stop-color="#8754C9"/>
</radialGradient>
<linearGradient id="paint2_linear_1_19" x1="79.1666" y1="90.8333" x2="93.3333" y2="90.8333" gradientUnits="userSpaceOnUse">
<stop stop-color="#FF4000"/>
<stop offset="1" stop-color="#8754C9"/>
</linearGradient>
<linearGradient id="paint3_linear_1_19" x1="29.1667" y1="26.6667" x2="29.1667" y2="40.8333" gradientUnits="userSpaceOnUse">
<stop stop-color="#8754C9"/>
<stop offset="1" stop-color="#FF4000"/>
</linearGradient>
<radialGradient id="paint4_radial_1_19" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(31.6666 88.3333) rotate(-90) scale(48.3333)">
<stop offset="0.723929" stop-color="#FFF700"/>
<stop offset="1" stop-color="#FF9901"/>
</radialGradient>
<linearGradient id="paint5_linear_1_19" x1="66.6666" y1="90.8333" x2="80" y2="90.8333" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFF700"/>
<stop offset="1" stop-color="#FF9901"/>
</linearGradient>
<linearGradient id="paint6_linear_1_19" x1="29.1666" y1="53.3333" x2="29.1666" y2="40" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFF700"/>
<stop offset="1" stop-color="#FF9901"/>
</linearGradient>
<radialGradient id="paint7_radial_1_19" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(31.6666 88.3333) rotate(-90) scale(35)">
<stop offset="0.59513" stop-color="#00AAFF"/>
<stop offset="1" stop-color="#01DA40"/>
</radialGradient>
<radialGradient id="paint8_radial_1_19" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(52.5 90.8333) scale(14.1667 37.7778)">
<stop stop-color="#00AAFF"/>
<stop offset="1" stop-color="#01DA40"/>
</radialGradient>
<radialGradient id="paint9_radial_1_19" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(29.1666 67.5) rotate(-90) scale(14.1667 268.642)">
<stop stop-color="#00AAFF"/>
<stop offset="1" stop-color="#01DA40"/>
</radialGradient>
<clipPath id="clip0_1_19">
<rect width="120" height="120" fill="white"/>
</clipPath>
</defs>
</svg>
`
6 changes: 4 additions & 2 deletions packages/injected/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ export enum ProviderIdentityFlag {
Enkrypt = 'isEnkrypt',
Zeal = 'isZeal',
Phantom = 'isPhantom',
Zerion = 'isZerion'
Zerion = 'isZerion',
Rainbow = 'isRainbow'
}

export enum ProviderLabel {
Expand Down Expand Up @@ -97,7 +98,8 @@ export enum ProviderLabel {
Enkrypt = 'Enkrypt',
Zeal = 'Zeal',
Phantom = 'Phantom',
Zerion = 'Zerion'
Zerion = 'Zerion',
Rainbow = 'Rainbow'
}

export interface MeetOneProvider extends ExternalProvider {
Expand Down
13 changes: 12 additions & 1 deletion packages/injected/src/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,16 @@ const phantom: InjectedWalletModule = {
platforms: ['all']
}

const rainbow: InjectedWalletModule = {
label: ProviderLabel.Rainbow,
injectedNamespace: InjectedNameSpace.Ethereum,
checkProviderIdentity: ({ provider }) =>
!!provider && !!provider[ProviderIdentityFlag.Rainbow],
getIcon: async () => (await import('./icons/rainbow.js')).default,
getInterface: getInjectedInterface(ProviderIdentityFlag.Rainbow),
platforms: ['all']
}

const wallets = [
zeal,
exodus,
Expand Down Expand Up @@ -699,7 +709,8 @@ const wallets = [
bitski,
enkrypt,
phantom,
zerion
zerion,
rainbow
]

export default wallets