Updated on 2026-08-14

This commit is contained in:
Tangem 2025-06-03 13:12:04 +04:00
parent 3bcb5280fb
commit 7703832cf1
17 changed files with 393 additions and 23 deletions

View file

@ -25,11 +25,12 @@ internal class DefaultNotificationsRepository @Inject constructor(
override suspend fun createApplicationId(pushToken: String?): ApplicationId = withContext(dispatchers.io) {
tangemTechApi.createApplicationId(
NotificationApplicationCreateBody(
platform = appInfoProvider.platform,
platform = appInfoProvider.platform.lowercase(),
device = appInfoProvider.device,
systemVersion = appInfoProvider.osVersion,
language = appInfoProvider.language,
timezone = appInfoProvider.timezone,
version = appInfoProvider.appVersion,
pushToken = pushToken,
),
).getOrThrow().appId.let(::ApplicationId)

View file

@ -50,6 +50,7 @@ class DefaultNotificationsRepositoryTest {
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.createApplicationId(any()) } returns ApiResponse.Success(
expectedAppIdResponse,
@ -68,6 +69,7 @@ class DefaultNotificationsRepositoryTest {
systemVersion = "11",
language = "en",
timezone = "UTC",
version = "5.21.1",
pushToken = pushToken,
),
)