ordzaar / ord-connect

Bitcoin Ordinal & Inscription aware wallet connect kit (React)
59 stars 13 forks source link

feat(useBalance): update useBalance to getBalance instead of getUnspents #255

Closed veralygit closed 4 months ago

veralygit commented 4 months ago

What this PR does / why we need it:

This PR is to update the useBalance() hook to getBalance instead of getUnspents Reason being useSend psbtBuilder will already check for spendable UTXOs setting useBalance to getBalance to check for wallet balance will allow faster balance checks when minting compared to getUnspents

always getting getUnspents especially for whale wallets will result in long wait time from the rpc

Additional comments?:

Developer Checklist: