Koniverse / SubConnect

Note: We have stopped further development of this version and replaced it with a new and more complete version here
https://github.com/Koniverse/SubConnect-v2
Apache License 2.0
43 stars 14 forks source link

Wagmi connector types are not compatible with latest version of wagmi #17

Closed Yuripetusko closed 1 year ago

Yuripetusko commented 1 year ago

Describe the bug When using SubWalletConnector, the chains object from wagmi and rainbowkit is incompatible

To Reproduce Steps to reproduce the behavior:

import { Chain, Wallet } from '@rainbow-me/rainbowkit';

export interface MyWalletOptions {
  chains: Chain[];
}

 const connector = new SubWalletConnector({
      chains,
    });

    //Types of property 'public' are incompatible.
    //Type 'RpcUrls' is not assignable to type 'string

Expected behavior To have no typescript errors

Screenshots

image

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

I had to fork talisman connector to apply the fix also https://github.com/Yuripetusko/talisman-connectors

saltict commented 1 year ago

Fix and deploy: https://www.npmjs.com/package/@subwallet/wagmi-connector/v/0.1.1