commit d7126171524f564c42f556858d83ec495b9d2271
parent d6a3ca2b992f75f03e1c229702ee1e51861eac56
Author: William Casarin <jb55@jb55.com>
Date: Fri, 25 Feb 2022 11:53:26 -0800
rpc_pay: explicit msats argument
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lightninglink/RPC.swift b/lightninglink/RPC.swift
@@ -264,10 +264,9 @@ public func rpc_getinfo(ln: LNSocket, token: String) -> RequestRes<GetInfo>
public func rpc_pay(ln: LNSocket, token: String, bolt11: String, amount_msat: Int64?) -> RequestRes<Pay>
{
-
var params: Array<String> = [ bolt11 ]
if amount_msat != nil {
- params.append("\(amount_msat!)")
+ params.append("\(amount_msat!)msat")
}
return performRpc(ln: ln, operation: "pay", authToken: token, timeout_ms: 30000, params: params)
}