diff options
| -rw-r--r-- | lib/ecash.ts | 3 | ||||
| -rw-r--r-- | routes/info.ts | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/ecash.ts b/lib/ecash.ts index 9de5cdc2..7c44bec0 100644 --- a/lib/ecash.ts +++ b/lib/ecash.ts @@ -56,8 +56,7 @@ export async function mint(amount) { } export async function check(token) { - const o = getDecodedToken(token); - const { mint, proofs } = o; + const { mint, proofs } = getDecodedToken(token); const total = proofs.reduce((a, b) => a + b.amount, 0); const external = await ext(mint); diff --git a/routes/info.ts b/routes/info.ts index 8892b7f7..e24d4621 100644 --- a/routes/info.ts +++ b/routes/info.ts @@ -21,7 +21,7 @@ export default { ); const lnwallet = parseInt(funds.outputs.reduce((a, b) => a + b.value, 0)); - const cash = getDecodedToken(await g("cash")).token[0].proofs.reduce( + const cash = getDecodedToken(await g("cash")).proofs.reduce( (a, b) => a + b.amount, 0, ); |
