From 435c0e3cf9ad9fbea33b1f6bbf5ae1709ab6f089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Lewandowski?= <35259896+pawellewandowski98@users.noreply.github.com> Date: Mon, 24 Jun 2024 13:19:52 +0200 Subject: [PATCH] feat(SPV-839): add requesterPaymail into upsert contact method (#243) --- contacts_test.go | 2 +- http.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contacts_test.go b/contacts_test.go index 4f6b0ba..0c103e1 100644 --- a/contacts_test.go +++ b/contacts_test.go @@ -63,7 +63,7 @@ func TestContactActionsRouting(t *testing.T) { }) t.Run("UpsertContact", func(t *testing.T) { - contact, err := client.UpsertContact(context.Background(), "test-id", "test@paymail.com", nil) + contact, err := client.UpsertContact(context.Background(), "test-id", "test@paymail.com", "", nil) require.NoError(t, err) require.NotNil(t, contact) }) diff --git a/http.go b/http.go index edfa4cc..6c66be6 100644 --- a/http.go +++ b/http.go @@ -623,8 +623,8 @@ func (wc *WalletClient) GetContacts(ctx context.Context, conditions *filter.Cont } // UpsertContact add or update contact. When adding a new contact, the system utilizes Paymail's PIKE capability to dispatch an invitation request, asking the counterparty to include the current user in their contacts. -func (wc *WalletClient) UpsertContact(ctx context.Context, paymail, fullName string, metadata map[string]any) (*models.Contact, ResponseError) { - return wc.UpsertContactForPaymail(ctx, paymail, fullName, metadata, "") +func (wc *WalletClient) UpsertContact(ctx context.Context, paymail, fullName, requesterPaymail string, metadata map[string]any) (*models.Contact, ResponseError) { + return wc.UpsertContactForPaymail(ctx, paymail, fullName, metadata, requesterPaymail) } // UpsertContactForPaymail add or update contact. When adding a new contact, the system utilizes Paymail's PIKE capability to dispatch an invitation request, asking the counterparty to include the current user in their contacts.