Updated on 2026-08-14

This commit is contained in:
Tangem 2023-02-07 19:30:26 +03:00
parent 5aae4c795f
commit a0104c613f
2 changed files with 9 additions and 3 deletions

View file

@ -63,6 +63,12 @@ class UserWalletIdBuilder private constructor(
)
}
fun walletPublicKey(publicKey: ByteArray): UserWalletId {
return UserWalletIdBuilder(
publicKey = publicKey,
).build()!!
}
private fun findPublicKey(wallets: List<CardDTO.Wallet>): ByteArray? {
return wallets.firstOrNull()
?.publicKey

View file

@ -11,8 +11,6 @@ import com.tangem.common.core.TangemSdkError
import com.tangem.common.extensions.guard
import com.tangem.common.extensions.isZero
import com.tangem.common.services.Result
import com.tangem.domain.common.extensions.successOr
import com.tangem.domain.common.util.UserWalletId
import com.tangem.datasource.api.paymentology.AttestationResponse
import com.tangem.datasource.api.paymentology.PaymentologyApiService
import com.tangem.datasource.api.paymentology.RegisterKYCRequest
@ -20,9 +18,11 @@ import com.tangem.datasource.api.paymentology.RegisterWalletRequest
import com.tangem.datasource.api.paymentology.RegisterWalletResponse
import com.tangem.datasource.api.paymentology.RegistrationResponse
import com.tangem.datasource.api.paymentology.tryExtractError
import com.tangem.domain.common.extensions.successOr
import com.tangem.operations.attestation.AttestWalletKeyResponse
import com.tangem.tap.common.extensions.safeUpdate
import com.tangem.tap.domain.getFirstToken
import com.tangem.tap.domain.model.builders.UserWalletIdBuilder
import com.tangem.tap.features.onboarding.products.wallet.saltPay.message.SaltPayActivationError
import java.math.BigDecimal
@ -184,7 +184,7 @@ class KYCUrlProvider(
kycProvider: KYCProvider,
) {
val kycRefId = UserWalletId(walletPublicKey).stringValue
val kycRefId = UserWalletIdBuilder.walletPublicKey(walletPublicKey).stringValue
val requestUrl: String = makeWebRequestUrl(kycProvider)