diff --git a/models/Payment.ts b/models/Payment.ts index 49b0e7223..a4fba94e5 100644 --- a/models/Payment.ts +++ b/models/Payment.ts @@ -13,7 +13,8 @@ import { lnrpc } from '../proto/lightning'; export default class Payment extends BaseModel { private payment_hash: string | { data: number[]; type: string }; // object if lndhub creation_date?: string; - value?: string | number; + value?: string | number; // lnd deprecated + value_sat?: string | number; fee_sat?: string; fee_msat?: string; payment_preimage: string; @@ -176,7 +177,10 @@ export default class Payment extends BaseModel { @computed public get getAmount(): number | string { return this.amount_msat ? Number(this.amount_msat.toString().replace('msat', '')) / 1000 - : this.value || Number(this.msatoshi_sent) / 1000 || 0; + : this.value_sat || + Number(this.msatoshi_sent) / 1000 || + this.value || + 0; } @computed public get getFee(): string {