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)