-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from superfluid-finance/update-deps
update deps & remove unnecessary ones
- Loading branch information
Showing
6 changed files
with
1,442 additions
and
1,216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,43 @@ | ||
import { connectorsForWallets } from '@rainbow-me/rainbowkit'; | ||
import { | ||
connectorsForWallets, | ||
} from "@rainbow-me/rainbowkit"; | ||
import { | ||
metaMaskWallet, | ||
braveWallet, | ||
walletConnectWallet, | ||
coinbaseWallet, | ||
rainbowWallet, | ||
} from "@rainbow-me/rainbowkit/wallets"; | ||
import gnosisSafe from "./gnosisSafeWalletConnector/gnosisSafe"; | ||
import mockConnector from "./mockConnector/mockConnector"; | ||
import { namedInjectedWallet } from "./namedInjectedWallet/namedInjectedWallet"; | ||
|
||
// Inspired by: https://github.com/rainbow-me/rainbowkit/blob/main/packages/rainbowkit/src/wallets/getDefaultWallets.ts | ||
export const getAppWallets = ({ | ||
appName, | ||
chains, | ||
projectId, | ||
}) => { | ||
const needsMock = | ||
typeof window !== "undefined" && | ||
typeof (window).mockSigner !== "undefined"; | ||
|
||
const wallets = [ | ||
{ | ||
groupName: "Popular", | ||
wallets: [ | ||
namedInjectedWallet({ chains, shimDisconnect: true }), | ||
gnosisSafe({ chains, projectId}), | ||
braveWallet({ chains, shimDisconnect: true }), | ||
metaMaskWallet({ | ||
chains, | ||
shimDisconnect: true, | ||
projectId: projectId | ||
}), | ||
walletConnectWallet({ chains, projectId, showQrModal: true }), | ||
coinbaseWallet({ appName, chains }), | ||
rainbowWallet( { chains, projectId }), | ||
...(needsMock ? [mockConnector({ chains })] : []), | ||
], | ||
}, | ||
]; | ||
|
||
return { | ||
connectors: connectorsForWallets(wallets), | ||
wallets, | ||
}; | ||
}; | ||
|
||
metaMaskWallet, | ||
braveWallet, | ||
walletConnectWallet, | ||
coinbaseWallet, | ||
rainbowWallet, | ||
} from '@rainbow-me/rainbowkit/wallets'; | ||
import gnosisSafe from './gnosisSafeWalletConnector/gnosisSafe'; | ||
import mockConnector from './mockConnector/mockConnector'; | ||
import { namedInjectedWallet } from './namedInjectedWallet/namedInjectedWallet'; | ||
|
||
// Inspired by: https://github.com/rainbow-me/rainbowkit/blob/main/packages/rainbowkit/src/wallets/getDefaultWallets.ts | ||
export const getAppWallets = ({ appName, chains, projectId }) => { | ||
const needsMock = | ||
typeof window !== 'undefined' && | ||
typeof window.mockSigner !== 'undefined'; | ||
|
||
const wallets = [ | ||
{ | ||
groupName: 'Popular', | ||
wallets: [ | ||
namedInjectedWallet({ chains, shimDisconnect: true }), | ||
gnosisSafe({ chains, projectId }), | ||
braveWallet({ chains, shimDisconnect: true }), | ||
metaMaskWallet({ | ||
chains, | ||
shimDisconnect: true, | ||
projectId: projectId, | ||
}), | ||
walletConnectWallet({ chains, projectId, showQrModal: true }), | ||
coinbaseWallet({ appName, chains }), | ||
rainbowWallet({ chains, projectId }), | ||
...(needsMock ? [mockConnector({ chains })] : []), | ||
], | ||
}, | ||
]; | ||
|
||
return { | ||
connectors: connectorsForWallets(wallets)(), | ||
wallets, | ||
}; | ||
}; |
35 changes: 18 additions & 17 deletions
35
toga-dashboard/src/components/wallet/gnosisSafeWalletConnector/gnosisSafe.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
import { SafeConnector } from "@wagmi/connectors/safe"; | ||
import { SafeConnector } from 'wagmi/connectors/safe'; | ||
|
||
const gnosisSafe = ({ chains }) => { | ||
return { | ||
id: "gnosis-safe", | ||
name: "Gnosis Safe", | ||
shortName: "Gnosis Safe", | ||
iconUrl: "/icons/ecosystem/gnosis_safe_2019_logo_rgb_sponsor_darkblue.svg", | ||
iconBackground: "#008168", | ||
createConnector: () => ({ | ||
connector: new SafeConnector({ | ||
chains, | ||
options: { | ||
allowedDomains: [/gnosis-safe.io$/, /app.safe.global$/], | ||
debug: false, | ||
}, | ||
}), | ||
}), | ||
}; | ||
return { | ||
id: 'gnosis-safe', | ||
name: 'Gnosis Safe', | ||
shortName: 'Gnosis Safe', | ||
iconUrl: | ||
'/icons/ecosystem/gnosis_safe_2019_logo_rgb_sponsor_darkblue.svg', | ||
iconBackground: '#008168', | ||
createConnector: () => ({ | ||
connector: new SafeConnector({ | ||
chains, | ||
options: { | ||
allowedDomains: [/gnosis-safe.io$/, /app.safe.global$/], | ||
debug: false, | ||
}, | ||
}), | ||
}), | ||
}; | ||
}; | ||
|
||
export default gnosisSafe; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.