mirror of
https://github.com/getAlby/lndhub.go.git
synced 2025-12-20 14:14:47 +01:00
feature: return custom records
This commit is contained in:
@@ -41,13 +41,14 @@ type KeySendResult struct {
|
||||
}
|
||||
|
||||
type KeySendResponseBody struct {
|
||||
Amount int64 `json:"amount"`
|
||||
Fee int64 `json:"fee"`
|
||||
Description string `json:"description,omitempty"`
|
||||
DescriptionHash string `json:"description_hash,omitempty"`
|
||||
Destination string `json:"destination,omitempty"`
|
||||
PaymentPreimage string `json:"payment_preimage,omitempty"`
|
||||
PaymentHash string `json:"payment_hash,omitempty"`
|
||||
Amount int64 `json:"amount"`
|
||||
Fee int64 `json:"fee"`
|
||||
Description string `json:"description,omitempty"`
|
||||
DescriptionHash string `json:"description_hash,omitempty"`
|
||||
Destination string `json:"destination,omitempty"`
|
||||
CustomRecords map[string]string `json:"customRecords" validate:"omitempty"`
|
||||
PaymentPreimage string `json:"payment_preimage,omitempty"`
|
||||
PaymentHash string `json:"payment_hash,omitempty"`
|
||||
}
|
||||
|
||||
// // KeySend godoc
|
||||
@@ -117,7 +118,8 @@ func (controller *KeySendController) MultiKeySend(c echo.Context) error {
|
||||
controller.svc.Logger.Errorf("Error making keysend split payment %v %s", keysend, err.Message)
|
||||
result.Keysends = append(result.Keysends, KeySendResult{
|
||||
Keysend: &KeySendResponseBody{
|
||||
Destination: keysend.Destination,
|
||||
Destination: keysend.Destination,
|
||||
CustomRecords: keysend.CustomRecords,
|
||||
},
|
||||
Error: err,
|
||||
})
|
||||
@@ -186,6 +188,7 @@ func (controller *KeySendController) SingleKeySend(c echo.Context, reqBody *KeyS
|
||||
responseBody := &KeySendResponseBody{
|
||||
Amount: sendPaymentResponse.PaymentRoute.TotalAmt,
|
||||
Fee: sendPaymentResponse.PaymentRoute.TotalFees,
|
||||
CustomRecords: reqBody.CustomRecords,
|
||||
Description: reqBody.Memo,
|
||||
Destination: reqBody.Destination,
|
||||
PaymentPreimage: sendPaymentResponse.PaymentPreimageStr,
|
||||
|
||||
Reference in New Issue
Block a user