Comment on page
🌈

Using RainbowKit

Banana wallet can be added to RainbowKit through rainbowkit plugin.

Installation

The plugin can be installed via the npm package @rize-labs/banana-rainbowkit-plugin.
npm install @rize-labs/banana-rainbowkit-plugin ethers
or
yarn add @rize-labs/banana-rainbowkit-plugin ethers

Usage

The wallet is then imported and added to the list of wallet connectors alongside the other RainbowKit wallets.
import { BananaWallet } from '@rize-labs/banana-rainbowkit-plugin'
import { connectorsForWallets } from '@rainbow-me/rainbowkit';
const connectors = connectorsForWallets([
{
groupName: 'Recommended',
wallets: [
BananaWallet({
chains,
connect: {
networkId: 80001
}
}),
...otherRainbowKitWallets
]
}
])

Parameters

chains

Chains supported by the app. This is the same parameter as would be passed to other RainbowKit wallets.

connect

Connect options for Banana, includes the default network id where the wallet will attempt a connection.

Example

A demo app for Banana Wallet integration with the Rainbowkit plugin is available here

Compatible Networks

  • Optimism Goerli
  • Ethereum Goerli
  • Polygon Mumbai
  • Gnosis Mainnet
  • Chiado Testnet
Note: Our plugin works best with wagmi^0.9.x and @rainbow-me/rainbowkit^0.8.x PS: if after following these steps you are experiencing webpack polyfill issue please refer to this page
If you have any questions please post them Banana SDK Discord forum.