diff options
| author | Adam Soltys <[email protected]> | 2024-09-18 11:57:54 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-09-18 11:57:54 -0700 |
| commit | c28a1b61881c34fcc1228d4600f5bb4aa0b81b53 (patch) | |
| tree | 999165339608443f64ed4a179bdfec2ce0e0f931 /lib | |
| parent | 3a493d30daa964b8dcb0bf1c74df995d8dc9fa32 (diff) | |
| download | coinos-server-c28a1b61881c34fcc1228d4600f5bb4aa0b81b53.tar.gz coinos-server-c28a1b61881c34fcc1228d4600f5bb4aa0b81b53.zip | |
account update and delete
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/migrate.ts | 2 | ||||
| -rw-r--r-- | lib/utils.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/migrate.ts b/lib/migrate.ts index 203444bf..a289dee2 100644 --- a/lib/migrate.ts +++ b/lib/migrate.ts @@ -21,7 +21,7 @@ async function migrate(id) { let accounts = await db.lLen(`${user.id}:accounts`); if (!accounts) { - await db.set(`account:${user.id}`, JSON.stringify({ id: user.id })); + await db.set(`account:${user.id}`, JSON.stringify({ id: user.id, name: "Cash" })); await db.lPush(`${user.id}:accounts`, user.id); } return user; diff --git a/lib/utils.ts b/lib/utils.ts index 2eab7f67..388ee6c8 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -38,7 +38,7 @@ export let bip21 = (address, { amount, memo, tip, type }) => { let url = new URLSearchParams(); if (amount) { - url.append("amount", btc(amount + tip)); + url.append("amount", btc(amount + tip).toFixed(8)); if (type === "liquid") url.append("assetid", config.liquid.btc); } |
