Updated on 2026-08-14

This commit is contained in:
Tangem 2025-07-16 21:35:35 +05:00
parent b3ea7fa232
commit 47f0bb91e6
2 changed files with 17 additions and 10 deletions

View file

@ -68,6 +68,10 @@ internal class DefaultNotificationsRepository @Inject constructor(
appId.value,
NotificationApplicationCreateBody(
pushToken = pushToken,
systemVersion = appInfoProvider.osVersion,
language = appInfoProvider.language,
timezone = appInfoProvider.timezone,
version = appInfoProvider.appVersion,
),
).getOrThrow()
}

View file

@ -111,16 +111,20 @@ class DefaultNotificationsRepositoryTest {
// GIVEN
val appId = ApplicationId("test-app-id")
val pushToken = "test-push-token"
coEvery { appInfoProvider.device } returns "test-device"
coEvery { appInfoProvider.osVersion } returns "11"
coEvery { appInfoProvider.language } returns "en"
coEvery { appInfoProvider.appVersion } returns "5.21.1"
coEvery { appInfoProvider.timezone } returns "UTC"
coEvery {
tangemTechApi.updatePushTokenForApplicationId(
appId.value,
NotificationApplicationCreateBody(
pushToken = pushToken,
platform = null,
device = null,
systemVersion = null,
language = null,
timezone = null,
systemVersion = "11",
language = "en",
timezone = "UTC",
version = "5.21.1",
),
)
} returns ApiResponse.Success(Unit)
@ -134,11 +138,10 @@ class DefaultNotificationsRepositoryTest {
appId.value,
NotificationApplicationCreateBody(
pushToken = pushToken,
platform = null,
device = null,
systemVersion = null,
language = null,
timezone = null,
systemVersion = "11",
language = "en",
timezone = "UTC",
version = "5.21.1",
),
)
}