Skip to content

Commit

Permalink
fix(saveContacts): add deviceId to saveContacts call (#4680)
Browse files Browse the repository at this point in the history
  • Loading branch information
jh2oman authored Dec 28, 2023
1 parent 22a1d43 commit fcf7a77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/identity/contactMapping.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ describe('saveContacts', () => {
contacts: [mockE164NumberInvite, mockE164Number, mockE164Number2Invite],
clientPlatform: 'android',
clientVersion: '0.0.1',
deviceId: 'abc-def-123',
}),
signal: expect.any(AbortSignal),
})
Expand Down Expand Up @@ -301,6 +302,7 @@ describe('saveContacts', () => {
contacts: [mockE164Number2, mockE164NumberInvite, mockE164Number, mockE164Number2Invite],
clientPlatform: 'android',
clientVersion: '0.0.1',
deviceId: 'abc-def-123',
}),
signal: expect.any(AbortSignal),
})
Expand Down Expand Up @@ -373,6 +375,7 @@ describe('saveContacts', () => {
contacts: [mockE164NumberInvite, mockE164Number, mockE164Number2Invite],
clientPlatform: 'android',
clientVersion: '0.0.1',
deviceId: 'abc-def-123',
}),
signal: expect.any(AbortSignal),
})
Expand Down
2 changes: 2 additions & 0 deletions src/identity/contactMapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ export function* saveContacts() {

const walletAddress = yield* select(walletAddressSelector)
const signedMessage = yield* call(retrieveSignedMessage)
const deviceId = yield* call(DeviceInfo.getUniqueId)

const response: Response = yield* call(fetchWithTimeout, `${networkConfig.saveContactsUrl}`, {
method: 'POST',
Expand All @@ -471,6 +472,7 @@ export function* saveContacts() {
contacts,
clientPlatform: Platform.OS,
clientVersion: DeviceInfo.getVersion(),
deviceId,
}),
})

Expand Down

0 comments on commit fcf7a77

Please sign in to comment.