Skip to content

Conversation

@ByteAtATime
Copy link

This PR adds a pretty neat feature: the possibility to include multiple burner connectors at once.

Previously, we would pass in the connector like this:

const wallets = [metaMaskWallet, rainbowkitBurnerWallet];

Now, you can pass in a custom id parameter, allowing you to simultaneously have two burner wallets in the same app. For example:

const wallets = [
  metaMaskWallet.
  rainbowkitBurnerWallet, // backwards compatible!
  rainbowkitBurnerWallet({ id: "burner-1", name: "Burner Wallet #1" }),
  rainbowkitBurnerWallet({ id: "burner-2", name: "Burner Wallet #2", storageKey: "custom-localstorage-private-key" }),
]

The id parameter is used by wagmi to differentiate between different connectors, as well as for storing the private key (by default, it stores the key in localStorage at {id}.pk). The localStorage key can be overridden using the storageKey field.

@ByteAtATime
Copy link
Author

Just thought of this: should we have something that tracks the registered IDs, to make sure there are no duplicates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant