Skip to content

Commit

Permalink
Wallet sync on load
Browse files Browse the repository at this point in the history
  • Loading branch information
lnbc1QWFyb24 committed Dec 10, 2023
1 parent 88b388f commit 0e86fef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clams-app",
"version": "2.0.0-beta.3",
"version": "2.0.0-beta.4",
"scripts": {
"dev": "vite dev",
"dev-https": "vite dev --mode https",
Expand Down
4 changes: 4 additions & 0 deletions src/routes/wallets/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import WalletRow from './WalletRow.svelte'
import { getWalletBalance } from '$lib/utils.js'
import { slide } from 'svelte/transition'
import { connections$, onDestroy$ } from '$lib/streams.js'
import { takeUntil } from 'rxjs'
const route = 'wallets'
const rowSize = 82
Expand All @@ -32,6 +34,8 @@
icon: plus
}
connections$.pipe(takeUntil(onDestroy$)).subscribe(connections => connections.forEach(sync))
$: totalBalance = Object.values(balances).reduce((total, balance) => total + balance, 0)
</script>

Expand Down

0 comments on commit 0e86fef

Please sign in to comment.