Updated on 2026-08-14

This commit is contained in:
Tangem 2026-07-14 00:14:47 +05:00
parent 5f1a711c8c
commit bd13529d69
17 changed files with 550 additions and 77 deletions

View file

@ -408,7 +408,7 @@ internal class DefaultPaymentAccountStatusFetcher @Inject constructor(
return onboardingRepository.getBankCredentials(userWalletId, accountInstance.id).fold(
ifLeft = { error ->
logger.e("getBankCredentials failed for ${accountInstance.id}: $error")
null
VirtualAccountOnramp.BankCredentialsError
},
ifRight = { credentials ->
VirtualAccountOnramp.Available(

View file

@ -238,7 +238,7 @@ internal class DefaultPaymentAccountStatusFetcherTest {
}
@Test
fun `GIVEN toggle on and ACCOUNT instance but bank credentials fetch fails WHEN invoke THEN virtualAccount is null`() =
fun `GIVEN toggle on and ACCOUNT instance but bank credentials fetch fails WHEN invoke THEN virtualAccount is Error`() =
runTest {
// Arrange
val customerInfo = buildCustomerInfo(
@ -256,7 +256,7 @@ internal class DefaultPaymentAccountStatusFetcherTest {
// Assert
val loaded = storedStatuses.lastLoaded()
assertThat(loaded.virtualAccount).isNull()
assertThat(loaded.virtualAccount).isEqualTo(VirtualAccountOnramp.BankCredentialsError)
}
@Test