From d18ad032bc2e97bbf0aa2903dca0734dc32e2093 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 16 Apr 2025 20:53:47 -0700 Subject: per-type fees --- routes/payments.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'routes') 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; -- cgit v1.2.3