From 6f2a95609e330c9edf6b7a7b0713bed75e8855dd Mon Sep 17 00:00:00 2001 From: calle <93376500+callebtc@users.noreply.github.com> Date: Tue, 14 Jun 2022 16:06:16 +0200 Subject: [PATCH] Tip error (#362) * tip no error message --- internal/lnbits/types.go | 2 +- internal/telegram/tip.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/lnbits/types.go b/internal/lnbits/types.go index fbb3f42..b52d03b 100644 --- a/internal/lnbits/types.go +++ b/internal/lnbits/types.go @@ -75,7 +75,7 @@ func (u *User) ResetState() { type InvoiceParams struct { Out bool `json:"out"` // must be True if invoice is payed, False if invoice is received - Amount int64 `json:"amount"` // amount in MilliSatoshi + Amount int64 `json:"amount"` // amount in Satoshi Memo string `json:"memo,omitempty"` // the invoice memo. Webhook string `json:"webhook,omitempty"` // the webhook to fire back to when payment is received. DescriptionHash string `json:"description_hash,omitempty"` // the invoice description hash. diff --git a/internal/telegram/tip.go b/internal/telegram/tip.go index f65c488..a05d77f 100644 --- a/internal/telegram/tip.go +++ b/internal/telegram/tip.go @@ -113,10 +113,10 @@ func (bot *TipBot) tipHandler(ctx intercept.Context) (intercept.Context, error) success, err := t.Send() if !success { NewMessage(m, WithDuration(0, bot)) - bot.trySendMessage(m.Sender, fmt.Sprintf("%s %s", Translate(ctx, "tipErrorMessage"), err)) + bot.trySendMessage(m.Sender, fmt.Sprintf("%s: %s", Translate(ctx, "tipErrorMessage"), Translate(ctx, "tipUndefinedErrorMsg"))) errMsg := fmt.Sprintf("[/tip] Transaction failed: %s", err.Error()) log.Warnln(errMsg) - return ctx, fmt.Errorf("could not create wallet for %s", toUserStr) + return ctx, err } // update tooltip if necessary