Updated on 2026-08-14

This commit is contained in:
Tangem 2026-07-07 17:10:29 +05:00
parent 370d902dad
commit 9efe573323
22 changed files with 360 additions and 39 deletions

View file

@ -181,13 +181,14 @@ internal class DefaultOnboardingRepository @Inject constructor(
override suspend fun createVirtualAccountOrder(
userWalletId: UserWalletId,
paymentAccountAddress: String,
idempotencyKey: String,
): Either<VisaApiError, String> = withContext(dispatcherProvider.io) {
requestHelper.performRequest(userWalletId) { authHeader ->
tangemPayApi.createVirtualAccountOrder(
authHeader = authHeader,
body = VirtualAccountOrderRequest(
data = VirtualAccountOrderRequest.Data(depositAddress = paymentAccountAddress),
idempotencyKey = UUID.randomUUID().toString(),
idempotencyKey = idempotencyKey,
),
)
}.map { response -> requireNotNull(response.result).id }