blocknative/react-demo

Use the "connectUnchecked" method instead of custom `UncheckedJsonRpcSigner` class

PaulRBerg opened this issue · 2 comments

Here's what happened:

  1. I started looking at this demo to understand how to use onboard.js in tandem with ethers.js.
  2. I noticed that I need to create a custom UncheckedJsonRpcSigner class.
  3. I started refactoring it for TypeScript
  4. Two hours later, I was done.
  5. Shortly afterwards, I realised that I wasted my time. Now, ethers.js provides a connectUnchecked method in the JsonRpcSigner class.

See how Uniswap uses it: https://github.com/Uniswap/uniswap-interface/blob/4078390a4890445d1ff0ed5196fd4cb56a44de87/src/utils/index.ts#L28-L30

Ahh man sorry you spent all of that time refactoring that class to TypeScript. It's great that they have that connectUnchecked method now. We will get this updated, thanks mate!

We have updated to the latest Ethers provider and all seems to be working as expected. Thanks again for the feedback!