Skip to content
Open
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
28 changes: 10 additions & 18 deletions app/src/constants/wallets.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Chain, getWalletConnectConnector, Wallet } from '@rainbow-me/rainbowkit'
import { InjectedConnector } from 'wagmi/connectors/injected'

import getAssetSrc from '../utils/getAssetSrc'

Expand Down Expand Up @@ -38,7 +39,11 @@ export const qredo = ({ chains }: WalletOptions): Wallet => ({
},
})

export const rabby = ({ chains }: WalletOptions): Wallet => ({
type RabbyWalletOptions = {
chains: Chain[]
shimDisconnect?: boolean
}
export const rabby = ({ chains, shimDisconnect }: RabbyWalletOptions): Wallet => ({
id: 'rabby',
name: 'Rabby Wallet',
iconUrl: getAssetSrc('/images/rabby.jpeg'),
Expand All @@ -48,25 +53,12 @@ export const rabby = ({ chains }: WalletOptions): Wallet => ({
},
iconBackground: '#e8e8e8',
createConnector: () => {
const connector = getWalletConnectConnector({ chains })
const connector = new InjectedConnector({
chains,
options: { shimDisconnect },
})
return {
connector,
mobile: {
getUri: async () => (await connector.getProvider()).connector.uri,
},
qrCode: {
getUri: async () => (await connector.getProvider()).connector.uri,
instructions: {
learnMoreUrl: 'https://rabby.io/',
steps: [
{
description: 'After you scan, a connection prompt will appear for you to connect your wallet.',
step: 'scan',
title: 'Tap the scan button',
},
],
},
},
}
},
})