commit a7951193abd3778252650eb13bd18653d1e162e5
parent 9ac699cb599631a19d575916995cee0bb3a77907
Author: William Casarin <jb55@jb55.com>
Date: Fri, 2 Sep 2022 16:15:14 -0700
use amount_msat in onchain fund tally
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lightninglink/RPC.swift b/lightninglink/RPC.swift
@@ -30,8 +30,8 @@ public struct RpcErrorData: Decodable, CustomStringConvertible {
public struct Output: Decodable {
//public var txid: String
//public var output: Int
- public var value: Int64
- //public var amount_msat: String
+ //public var value: Int64
+ public var amount_msat: Int64
//public var scriptpubkey: String
//public var address: String
//public var status: String
diff --git a/lightninglink/Views/ContentView.swift b/lightninglink/Views/ContentView.swift
@@ -73,7 +73,7 @@ struct Funds {
}
for output in outputs {
- onchain_sats += output.value
+ onchain_sats += output.amount_msat / 1000
}
return Funds(onchain_sats: onchain_sats, channel_sats: channel_sats)