Updated on 2026-08-14

This commit is contained in:
Tangem 2025-06-17 11:20:30 +03:00
parent 422e406d15
commit 7c91472d99
7 changed files with 26 additions and 12 deletions

View file

@ -47,12 +47,14 @@ internal class DefaultVisaAuthRepository @Inject constructor(
}
override suspend fun getCardWalletAuthChallenge(
cardId: String,
cardWalletAddress: String,
): Either<VisaApiError, VisaAuthChallenge.Wallet> = withContext(dispatchers.io) {
request {
visaAuthApi.generateNonceByCardWallet(
GenerateNoneByCardWalletRequest(
cardWalletAddress = cardWalletAddress,
cardId = cardId,
),
).getOrThrow()
}.map { response ->
@ -82,6 +84,7 @@ internal class DefaultVisaAuthRepository @Inject constructor(
GetAccessTokenByCardWalletRequest(
sessionId = signedChallenge.challenge.session.sessionId,
signature = signedChallenge.signature,
salt = signedChallenge.salt,
),
).getOrThrow()
}