Skip to content

Commit

Permalink
feat: add Magic Eden Wallet support (#1998)
Browse files Browse the repository at this point in the history
* chore: formatting in custom-wallet-list

* chore: changeset

* chore: minify svg

---------

Co-authored-by: Daniel Sinclair <d@niel.nyc>
  • Loading branch information
Tcadle434 and DanielSinclair authored May 23, 2024
1 parent d26f7c4 commit 725a376
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/happy-beers-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@rainbow-me/rainbowkit": patch
"example": patch
"site": patch
---

Added Magic Eden Wallet support with `magicEdenWallet` wallet connector
2 changes: 2 additions & 0 deletions packages/example/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import {
krakenWallet,
kresusWallet,
ledgerWallet,
magicEdenWallet,
mewWallet,
oktoWallet,
okxWallet,
Expand Down Expand Up @@ -206,6 +207,7 @@ const config = getDefaultConfig({
krakenWallet,
kaikasWallet,
ledgerWallet,
magicEdenWallet,
mewWallet,
oktoWallet,
okxWallet,
Expand Down
17 changes: 17 additions & 0 deletions packages/rainbowkit/src/locales/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,23 @@
}
},

"magicEden": {
"extension": {
"step1": {
"title": "Install the Magic Eden extension",
"description": "We recommend pinning Magic Eden to your taskbar for easier access to your wallet."
},
"step2": {
"title": "Create or Import a Wallet",
"description": "Be sure to back up your wallet using a secure method. Never share your secret recovery phrase with anyone."
},
"step3": {
"title": "Refresh your browser",
"description": "Once you set up your wallet, click below to refresh the browser and load up the extension."
}
}
},

"metamask": {
"qr_code": {
"step1": {
Expand Down
2 changes: 2 additions & 0 deletions packages/rainbowkit/src/wallets/walletConnectors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { kaikasWallet } from './kaikasWallet/kaikasWallet';
import { krakenWallet } from './krakenWallet/krakenWallet';
import { kresusWallet } from './kresusWallet/kresusWallet';
import { ledgerWallet } from './ledgerWallet/ledgerWallet';
import { magicEdenWallet } from './magicEdenWallet/magicEdenWallet';
import { metaMaskWallet } from './metaMaskWallet/metaMaskWallet';
import { mewWallet } from './mewWallet/mewWallet';
import { oktoWallet } from './oktoWallet/oktoWallet';
Expand Down Expand Up @@ -78,6 +79,7 @@ export {
krakenWallet,
kresusWallet,
ledgerWallet,
magicEdenWallet,
metaMaskWallet,
mewWallet,
oktoWallet,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { Wallet } from '../../Wallet';
import {
getInjectedConnector,
hasInjectedProvider,
} from '../../getInjectedConnector';

export const magicEdenWallet = (): Wallet => {
return {
id: 'magicEden',
name: 'Magic Eden Wallet',
iconUrl: async () => (await import('./magicEden.svg')).default,
iconBackground: '#36114D',
installed: hasInjectedProvider({ namespace: 'magicEden.ethereum' }),
downloadUrls: {
chrome:
'https://chromewebstore.google.com/detail/magic-eden-wallet/mkpegjkblkkefacfnmkajcjmabijhclg',
browserExtension: 'https://wallet.magiceden.io/',
},
extension: {
instructions: {
steps: [
{
description:
'wallet_connectors.magicEden.extension.step1.description',
step: 'install',
title: 'wallet_connectors.magicEden.extension.step1.title',
},
{
description:
'wallet_connectors.magicEden.extension.step2.description',
step: 'create',
title: 'wallet_connectors.magicEden.extension.step2.title',
},
{
description:
'wallet_connectors.magicEden.extension.step3.description',
step: 'refresh',
title: 'wallet_connectors.magicEden.extension.step3.title',
},
],
learnMoreUrl: 'https://wallet.magiceden.io/support',
},
},
createConnector: getInjectedConnector({
namespace: 'magicEden.ethereum',
}),
};
};
8 changes: 7 additions & 1 deletion site/data/en-US/docs/custom-wallet-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ import { kresusWallet } from '@rainbow-me/rainbowkit/wallets';
import { kaikasWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Magic Eden Wallet

```tsx
import { magicEdenWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### MetaMask

```tsx
Expand Down Expand Up @@ -439,4 +445,4 @@ const connectors = connectorsForWallets(
],
{ appName: 'RainbowKit App', projectId: 'YOUR_PROJECT_ID' },
);
```
```

0 comments on commit 725a376

Please sign in to comment.