From 373f236a0dd9f57f831fff4c6eff5ee5d67a3c75 Mon Sep 17 00:00:00 2001 From: kiwiidb Date: Thu, 29 Dec 2022 15:19:01 +0100 Subject: [PATCH] keysend: custom records --- controllers_v2/keysend.ctrl.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/controllers_v2/keysend.ctrl.go b/controllers_v2/keysend.ctrl.go index 6f6a65a..fb8f108 100644 --- a/controllers_v2/keysend.ctrl.go +++ b/controllers_v2/keysend.ctrl.go @@ -26,7 +26,7 @@ type KeySendRequestBody struct { Destination string `json:"destination" validate:"required"` Memo string `json:"memo" validate:"omitempty"` DeprecatedCustomRecords map[string]string `json:"customRecords" validate:"omitempty"` - NewCustomRecords map[string]string `json:"custom_records" validate:"omitempty"` + CustomRecords map[string]string `json:"custom_records" validate:"omitempty"` } type MultiKeySendRequestBody struct { @@ -120,7 +120,7 @@ func (controller *KeySendController) MultiKeySend(c echo.Context) error { result.Keysends = append(result.Keysends, KeySendResult{ Keysend: &KeySendResponseBody{ Destination: keysend.Destination, - CustomRecords: keysend.NewCustomRecords, + CustomRecords: keysend.CustomRecords, }, Error: err, }) @@ -171,8 +171,8 @@ func (controller *KeySendController) SingleKeySend(c echo.Context, reqBody *KeyS //temporary workaround due to an inconsistency in json snake case vs camel case //DeprecatedCustomRecords to be removed later customRecords := reqBody.DeprecatedCustomRecords - if reqBody.NewCustomRecords != nil { - customRecords = reqBody.NewCustomRecords + if reqBody.CustomRecords != nil { + customRecords = reqBody.CustomRecords } for key, value := range customRecords { intKey, err := strconv.Atoi(key)