Updated on 2026-08-14
This commit is contained in:
parent
4d0cb6a243
commit
ebf28a282b
42 changed files with 1198 additions and 394 deletions
|
|
@ -75,7 +75,10 @@ internal class DefaultTangemPayCardDetailsRepository @Inject constructor(
|
|||
)
|
||||
}
|
||||
|
||||
override suspend fun revealCardDetails(userWalletId: UserWalletId): Either<UniversalError, TangemPayCardDetails> {
|
||||
override suspend fun revealCardDetails(
|
||||
userWalletId: UserWalletId,
|
||||
cardId: String,
|
||||
): Either<UniversalError, TangemPayCardDetails> {
|
||||
return catch(
|
||||
block = {
|
||||
val publicKeyBase64 = getPublicKeyBase64()
|
||||
|
|
@ -84,6 +87,7 @@ internal class DefaultTangemPayCardDetailsRepository @Inject constructor(
|
|||
requestHelper.performRequest(userWalletId = userWalletId) { authHeader ->
|
||||
tangemPayApi.revealCardDetails(
|
||||
authHeader = authHeader,
|
||||
cardId = cardId,
|
||||
body = CardDetailsRequest(sessionId = sessionId),
|
||||
)
|
||||
}.getOrNull()?.result,
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ internal class MockAwareTangemPayCardDetailsRepository @Inject constructor(
|
|||
|
||||
override suspend fun revealCardDetails(
|
||||
userWalletId: UserWalletId,
|
||||
cardId: String,
|
||||
): Either<UniversalError, TangemPayCardDetails> {
|
||||
if (isMockMode) {
|
||||
return TangemPayCardDetails(
|
||||
|
|
@ -44,7 +45,7 @@ internal class MockAwareTangemPayCardDetailsRepository @Inject constructor(
|
|||
expirationMonth = MOCK_EXPIRATION_MONTH,
|
||||
).right()
|
||||
}
|
||||
return real.revealCardDetails(userWalletId)
|
||||
return real.revealCardDetails(userWalletId, cardId)
|
||||
}
|
||||
|
||||
override suspend fun getPin(userWalletId: UserWalletId, cardId: String): Either<UniversalError, String?> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue