From cdf95276ff1137dc47f5e420d783af5f4196ac5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Lewandowski?= <35259896+pawellewandowski98@users.noreply.github.com> Date: Tue, 19 Mar 2024 10:22:52 +0100 Subject: [PATCH] feat(BUX-645): adjust xpub parameter name (#205) --- transports/http_admin.go | 4 ++-- transports/interface.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/transports/http_admin.go b/transports/http_admin.go index ecfd0cd..3c9548f 100644 --- a/transports/http_admin.go +++ b/transports/http_admin.go @@ -150,9 +150,9 @@ func (h *TransportHTTP) AdminGetPaymailsCount(ctx context.Context, conditions ma } // AdminCreatePaymail create a new paymail for a xpub -func (h *TransportHTTP) AdminCreatePaymail(ctx context.Context, xPubID string, address string, publicName string, avatar string) (*models.PaymailAddress, ResponseError) { +func (h *TransportHTTP) AdminCreatePaymail(ctx context.Context, rawXPub string, address string, publicName string, avatar string) (*models.PaymailAddress, ResponseError) { jsonStr, err := json.Marshal(map[string]interface{}{ - FieldXpubID: xPubID, + FieldXpubKey: rawXPub, FieldAddress: address, FieldPublicName: publicName, FieldAvatar: avatar, diff --git a/transports/interface.go b/transports/interface.go index 4add341..dcec8ee 100644 --- a/transports/interface.go +++ b/transports/interface.go @@ -62,7 +62,7 @@ type AdminService interface { AdminGetPaymail(ctx context.Context, address string) (*models.PaymailAddress, ResponseError) AdminGetPaymails(ctx context.Context, conditions map[string]interface{}, metadata *models.Metadata, queryParams *QueryParams) ([]*models.PaymailAddress, ResponseError) AdminGetPaymailsCount(ctx context.Context, conditions map[string]interface{}, metadata *models.Metadata) (int64, ResponseError) - AdminCreatePaymail(ctx context.Context, xPubID string, address string, publicName string, avatar string) (*models.PaymailAddress, ResponseError) + AdminCreatePaymail(ctx context.Context, rawXPub string, address string, publicName string, avatar string) (*models.PaymailAddress, ResponseError) AdminDeletePaymail(ctx context.Context, address string) ResponseError AdminGetTransactions(ctx context.Context, conditions map[string]interface{}, metadata *models.Metadata, queryParams *QueryParams) ([]*models.Transaction, ResponseError) AdminGetTransactionsCount(ctx context.Context, conditions map[string]interface{}, metadata *models.Metadata) (int64, ResponseError)