diff options
| author | Adam Soltys <[email protected]> | 2025-04-16 20:53:47 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-04-16 21:28:51 -0700 |
| commit | d18ad032bc2e97bbf0aa2903dca0734dc32e2093 (patch) | |
| tree | dc23e74c264c7643eb160a59d2c7480d861a2407 /routes | |
| parent | 19d0997d10d4ed9054cf63328ea148c9367ef40e (diff) | |
| download | coinos-server-d18ad032bc2e97bbf0aa2903dca0734dc32e2093.tar.gz coinos-server-d18ad032bc2e97bbf0aa2903dca0734dc32e2093.zip | |
per-type fees
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/payments.ts | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/routes/payments.ts b/routes/payments.ts index dd41b730..71f29da4 100644 --- a/routes/payments.ts +++ b/routes/payments.ts @@ -28,11 +28,8 @@ import { import rpc from "@coinos/rpc"; import got from "got"; import { v4 } from "uuid"; - import { PaymentType } from "$lib/types"; - import ln from "$lib/ln"; -const { URL } = process.env; export default { async info(_, res) { @@ -212,7 +209,7 @@ export default { const alias = node ? node.alias : payee.substr(0, 12); const amount = Math.round(amount_msat / 1000); - let ourfee = Math.round(amount * config.fee); + let ourfee = Math.round(amount * config.fee[PaymentType.lightning]); const credit = await g(`credit:lightning:${user.id}`); const covered = Math.min(credit, ourfee) || 0; ourfee -= covered; |
