Updated on 2026-08-14
This commit is contained in:
parent
5f1a711c8c
commit
bd13529d69
17 changed files with 550 additions and 77 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue