diff --git a/protocol/messenger_pairing_and_syncing.go b/protocol/messenger_pairing_and_syncing.go index a776d380a..2602bbca6 100644 --- a/protocol/messenger_pairing_and_syncing.go +++ b/protocol/messenger_pairing_and_syncing.go @@ -17,7 +17,7 @@ import ( "github.com/status-im/status-go/protocol/requests" ) -func (m *Messenger) EnableAndSyncInstallation(request *requests.EnableAndSyncInstallation) (*MessengerResponse, error) { +func (m *Messenger) EnableInstallationAndSync(request *requests.EnableInstallationAndSync) (*MessengerResponse, error) { if err := request.Validate(); err != nil { return nil, err } diff --git a/protocol/messenger_pairing_and_syncing_test.go b/protocol/messenger_pairing_and_syncing_test.go index fe2235e85..d632d064a 100644 --- a/protocol/messenger_pairing_and_syncing_test.go +++ b/protocol/messenger_pairing_and_syncing_test.go @@ -102,7 +102,7 @@ func (s *MessengerPairingSuite) TestMessengerPairAfterSeedPhrase() { ) s.Require().NoError(err) - _, err = alice1.EnableAndSyncInstallation(&requests.EnableAndSyncInstallation{InstallationID: installationID2}) + _, err = alice1.EnableInstallationAndSync(&requests.EnableInstallationAndSync{InstallationID: installationID2}) s.Require().NoError(err) // check if the display name is synced diff --git a/protocol/requests/enable_and_sync_installation.go b/protocol/requests/enable_and_sync_installation.go index da4e30a2d..22c585a89 100644 --- a/protocol/requests/enable_and_sync_installation.go +++ b/protocol/requests/enable_and_sync_installation.go @@ -4,15 +4,15 @@ import ( "errors" ) -var ErrEnableAndSyncInstallationInvalidID = errors.New("enable and sync installation: invalid installation id") +var ErrEnableInstallationAndSyncInvalidID = errors.New("enable installation and sync : invalid installation id") -type EnableAndSyncInstallation struct { +type EnableInstallationAndSync struct { InstallationID string `json:"installationId"` } -func (j *EnableAndSyncInstallation) Validate() error { +func (j *EnableInstallationAndSync) Validate() error { if len(j.InstallationID) == 0 { - return ErrEnableAndSyncInstallationInvalidID + return ErrEnableInstallationAndSyncInvalidID } return nil diff --git a/services/ext/api.go b/services/ext/api.go index 68c3b6e61..119d10fdd 100644 --- a/services/ext/api.go +++ b/services/ext/api.go @@ -1064,8 +1064,8 @@ func (api *PublicAPI) SyncDevices(ctx context.Context, name, picture string) err return api.service.messenger.SyncDevices(ctx, name, picture, nil) } -func (api *PublicAPI) EnableAndSyncInstallation(request *requests.EnableAndSyncInstallation) (*protocol.MessengerResponse, error) { - return api.service.messenger.EnableAndSyncInstallation(request) +func (api *PublicAPI) EnableInstallationAndSync(request *requests.EnableInstallationAndSync) (*protocol.MessengerResponse, error) { + return api.service.messenger.EnableInstallationAndSync(request) } func (api *PublicAPI) EnableInstallationAndPair(request *requests.EnableInstallationAndPair) (*protocol.MessengerResponse, error) {