HausDAO / monorepo

MIT License
24 stars 16 forks source link

Update the dependency on DH Connect in the TXBuilder Library #518

Open skuhlmann opened 2 months ago

skuhlmann commented 2 months ago

App

Feature Type

Feature

The TxBuilder library currently takes a viem provider/public client as a prop. This provider is currently only able to be the provider used in DH connect. We want to be able to use any wagmi/viem provider.

Needs to be evaluated more, but might just be a type issue https://github.com/HausDAO/monorepo/blob/develop/libs/tx-builder/src/TXBuilder.tsx#L3C10-L3C22

Deliverables

  1. Update TxBuilder package so it can use any provider from wagmi/viem and be used in an app that doesn't have DH connect.

    • test with wallet connect/web3modal, rainbow kit, connectkit
  2. Ensure this is backward compatible with DH connect and still works in the summon and admin apps

    • transaction still process?
  3. Create a branch on this repo with an example of another wallet connection implementation https://github.com/HausDAO/dao-app-starter-vite

    • wallet connect/web3modal, rainbow kit or connectkit
  4. Submit a PR for testing and we'll work together on a deployment and new release.

Resources

library code https://github.com/HausDAO/monorepo/tree/develop/libs/tx-builder

provider prop https://github.com/HausDAO/monorepo/blob/develop/libs/tx-builder/src/TXBuilder.tsx#L83

starter repo to fork and try with other wallet implementations https://github.com/HausDAO/dao-app-starter-vite https://github.com/HausDAO/dao-app-starter-vite/blob/main/src/components/layout/DaoContainer.tsx#L94

Screenshots and Context

No response

skuhlmann commented 4 days ago

The provider type comes from view. So likely not the issue.

Here's an attempt that runs into many more dependency problems.

https://github.com/HausDAO/dao-app-starter-vite/tree/sk/tries-connectkit