This commit is contained in:
boufni95 2024-06-20 20:26:55 +02:00
parent 72659e640c
commit 406ffa615b

View file

@ -263,7 +263,7 @@ export class VoltageLSP extends LSP {
return json
}
getFees = async (amtMsat: string, pubkey: string) => {
getFees = async (amtMsat: number, pubkey: string) => {
const res = await fetch(`${this.settings.voltageServiceUrl}/fee`, {
method: "POST",
body: JSON.stringify({ amount_msat: amtMsat, pubkey }),
@ -288,7 +288,7 @@ export class VoltageLSP extends LSP {
const lndInfo = await this.lnd.GetInfo()
const myPub = lndInfo.identityPubkey
const amtMsats = this.settings.channelThreshold.toString() + "000"
const amtMsats = this.settings.channelThreshold * 1000
const fee = await this.getFees(amtMsats, myPub)
const feeSats = fee.fee_amount_msat / 1000
const relativeFee = feeSats / this.settings.channelThreshold