Conversation
Deploying aibtcdev-frontend-staging with
|
| Latest commit: |
77ead73
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://97536502.aibtcdev-frontend-staging.pages.dev |
| Branch Preview URL: | https://btc-deposit.aibtcdev-frontend-staging.pages.dev |
|
Okay, I’ve finally fixed all the any types, but it needs a review from @whoabuddy before merging. I also haven’t tested it with the Leather wallet yet, so it still needs to be tested using Leather. All the code is included. P.S It does not work on testnet |
There was a problem hiding this comment.
We used to have something in the cache for this, would fit nice with the cached lookup + bustCache pattern since they can change but most people will stick to one per address. There are Hiro API endpoints too.
whoabuddy
left a comment
There was a problem hiding this comment.
Looked over the code and don't see any blockers. Currently unable to test as its deployed to testnet which isn't supported. Will need to run locally to test between wallet providers but reading through the code:
- happy to merge this now as a starting point, looks good now that builds are passing
- includes some new packages, utilities, and pretty large components (can refactor later)
- we should look over how to better integrate Xverse/Leather for RPC methods in general
| >(null); | ||
|
|
||
| // Set the wallet provider based on the session when initialized | ||
| useEffect(() => { |
There was a problem hiding this comment.
Is this a standard way to check for provider or a custom implementation?
RPC methods are described in a Stacks Improvement Proposal here for how to detect wallet providers:
stacksgov/sips#166
I think there are related docs for sats connect too that should help.
https://docs.xverse.app/sats-connect
There was a problem hiding this comment.
This one's custom implementation. I looked into rafa's implementation and used it here
| queryFn: async () => { | ||
| if (!btcAddress) return null; | ||
|
|
||
| const blockstreamUrl = `https://blockstream.info/api/address/${btcAddress}/utxo`; |
There was a problem hiding this comment.
Noting we're introducing blockstream.info for balances
| try { | ||
| console.log("Fetching fee estimates directly from mempool.space"); | ||
| const response = await fetch( | ||
| "https://mempool.space/api/v1/fees/recommended" |
There was a problem hiding this comment.
Note we're introducing mempool.space for fee estimation
There was a problem hiding this comment.
Overall this file looks good but suspect we'll be able to separate and pull out some utility pieces later as the code is super long!
There was a problem hiding this comment.
Same here, giant component, but goal is to make it work then make it pretty
There was a problem hiding this comment.
Same here, def some generic helpers like background color and other display items, but can refactor later
|
phewwwww.... |
No description provided.