Tip error (#362)

* tip no error message
This commit is contained in:
calle 2022-06-14 16:06:16 +02:00 committed by GitHub
parent d2a63c07a3
commit 6f2a95609e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -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.

View file

@ -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