Skip to content

Commit

Permalink
fix: trim / from lambdaServer url
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmohsin7 authored and vincenzopalazzo committed Feb 6, 2024
1 parent da416c8 commit d51a40e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/lnlambda/lib/src/lnlambda_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,16 @@ class LNLambdaClient implements LightningClient {
throw Exception(
"A rune for the call need to be specified or in the params as `steal_rune` or in the client constructor as default rune");
}
var lnLambdaServer = lambdaServer.endsWith('/')
? lambdaServer.substring(0, lambdaServer.length - 1)
: lambdaServer;
var request = LNLambdaRequest(
nodeID: nodeID,
host: host,
rune: callRune,
method: method,
params: params);
var response = await http.post(Uri.parse("$lambdaServer/lnsocket"),
var response = await http.post(Uri.parse("$lnLambdaServer/lnsocket"),
headers: {
'Content-Type': 'application/json; charset=UTF-8',
},
Expand Down

0 comments on commit d51a40e

Please sign in to comment.