Skip to content

Commit

Permalink
feat: implemented remaining rpcs from fedimint_client_wasm (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlwn123 authored Sep 11, 2024
1 parent 377b394 commit 41bd257
Show file tree
Hide file tree
Showing 6 changed files with 388 additions and 51 deletions.
5 changes: 5 additions & 0 deletions .changeset/curly-crews-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fedimint/core-web': patch
---

Added remaining RPCs from fedimintClientWasm to FedimintWallet
5 changes: 5 additions & 0 deletions .changeset/curvy-coats-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fedimint/core-web': patch
---

Implemented type type system for rpcs
13 changes: 6 additions & 7 deletions examples/vite-core/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,22 @@ const useBalance = () => {
const [balance, setBalance] = useState(0)

useEffect(() => {
// console.log('subscribing')
const unsubscribe = wallet.subscribeBalance((balance: number) => {
// console.log('balance', balance)
setBalance(balance)
})

return unsubscribe
return () => {
// console.log('unsubscribing')
unsubscribe()
}
}, [])

return balance
}

const App = () => {
useEffect(() => {
return () => {
// wallet?.cleanup().catch(console.error)
}
}, [])

return (
<>
<header>
Expand Down
Loading

0 comments on commit 41bd257

Please sign in to comment.