diff options
Diffstat (limited to 'routes/info.ts')
| -rw-r--r-- | routes/info.ts | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/routes/info.ts b/routes/info.ts index a0ac7693..aae130bf 100644 --- a/routes/info.ts +++ b/routes/info.ts @@ -1,8 +1,8 @@ import { archive } from "$lib/db"; -import { db, g } from "$lib/db"; +import { db } from "$lib/db"; import { getHealthStatus } from "$lib/health"; import ln from "$lib/ln"; -import { getDecodedToken } from "@cashu/cashu-ts"; +import { pool } from "$lib/ecash"; export default { async health(_, res) { @@ -28,10 +28,7 @@ export default { ); const lnwallet = parseInt(funds.outputs.reduce((a, b) => a + b.value, 0)); - const cash = getDecodedToken(await g("cash")).proofs.reduce( - (a, b) => a + b.amount, - 0, - ); + const cash = (await pool()).reduce((a, b) => a + b.amount, 0); const info = { cash, |
