cmd/commands: export StripPrefix

This commit is contained in:
Oliver Gugger
2024-05-02 14:38:13 +02:00
parent 3ba83dd111
commit fb2a9026f3
4 changed files with 7 additions and 7 deletions

View File

@@ -325,7 +325,7 @@ func SendPayment(ctx *cli.Context) error {
// details of the payment are encoded within the request.
if ctx.IsSet("pay_req") {
req := &routerrpc.SendPaymentRequest{
PaymentRequest: stripPrefix(ctx.String("pay_req")),
PaymentRequest: StripPrefix(ctx.String("pay_req")),
Amt: ctx.Int64("amt"),
DestCustomRecords: make(map[uint64][]byte),
}
@@ -883,7 +883,7 @@ func payInvoice(ctx *cli.Context) error {
}
req := &routerrpc.SendPaymentRequest{
PaymentRequest: stripPrefix(payReq),
PaymentRequest: StripPrefix(payReq),
Amt: ctx.Int64("amt"),
DestCustomRecords: make(map[uint64][]byte),
}
@@ -1870,7 +1870,7 @@ func estimateRouteFee(ctx *cli.Context) error {
req.AmtSat = amtSat
case ctx.IsSet("pay_req"):
req.PaymentRequest = stripPrefix(ctx.String("pay_req"))
req.PaymentRequest = StripPrefix(ctx.String("pay_req"))
if ctx.IsSet("timeout") {
req.Timeout = uint32(ctx.Duration("timeout").Seconds())
}