Updated on 2026-08-14

This commit is contained in:
Tangem 2026-07-14 01:36:42 -07:00
parent 65d2e84c6e
commit 9e986a6cb3
21 changed files with 180 additions and 77 deletions

View file

@ -76,6 +76,7 @@ internal class PaymentAccountStatusValueDMConverter @Inject constructor(
// Transient statuses are not persisted
is PaymentAccountStatusValue.Loading,
is PaymentAccountStatusValue.AwaitingPlanSelection,
is PaymentAccountStatusValue.Inactive,
is PaymentAccountStatusValue.Error.ExposedDevice,
is PaymentAccountStatusValue.Error.Unavailable,
is PaymentAccountStatusValue.Error.NotSynced,

View file

@ -108,7 +108,28 @@ internal class PaymentAccountStatusValueDMConverterTest {
// GIVEN
val domain = PaymentAccountStatusValue.AwaitingPlanSelection(
source = StatusSource.ACTUAL,
tariffPlan = null,
cryptoCurrency = cryptoCurrency,
tariffPlan = mockk(),
)
// WHEN
val result = converter.convert(domain)
// THEN
assertThat(result).isNull()
}
@Test
fun `GIVEN domain Inactive WHEN convert THEN returns null (transient, not persisted)`() {
// GIVEN
val domain = PaymentAccountStatusValue.Inactive(
source = StatusSource.ACTUAL,
fiatBalance = PaymentAccountStatusValue.FiatBalance(
availableBalance = BigDecimal("100"),
currency = "USD",
),
cryptoCurrency = cryptoCurrency,
tariffPlan = mockk(),
)
// WHEN