Updated on 2026-08-14

This commit is contained in:
Tangem 2025-09-12 20:09:00 +03:00
commit e9ed7949ae
10 changed files with 28 additions and 5 deletions

@ -1 +1 @@
Subproject commit d3ba082fadbdb583a45cc1c714c57b382cbbe6ef
Subproject commit ad46a043f9b98b4f4577f906920532cb370c15d4

View file

@ -10,7 +10,7 @@ import com.tangem.data.walletconnect.sign.SignCollector
import com.tangem.data.walletconnect.sign.SignStateConverter.toResult
import com.tangem.data.walletconnect.sign.WcMethodUseCaseContext
import com.tangem.data.walletconnect.utils.BlockAidVerificationDelegate
import com.tangem.domain.transaction.usecase.PrepareAndSignUseCase
import com.tangem.domain.transaction.usecase.PrepareForSendUseCase
import com.tangem.domain.walletconnect.error.parseSendError
import com.tangem.domain.walletconnect.model.WcSolanaMethod
import com.tangem.domain.walletconnect.usecase.method.BlockAidTransactionCheck
@ -29,7 +29,7 @@ import org.json.JSONObject
internal class WcSolanaSignAllTransactionUseCase @AssistedInject constructor(
override val respondService: WcRespondService,
override val analytics: AnalyticsEventHandler,
private val prepareAndSign: PrepareAndSignUseCase,
private val prepareForSend: PrepareForSendUseCase,
@Assisted override val context: WcMethodUseCaseContext,
@Assisted override val method: WcSolanaMethod.SignAllTransaction,
blockAidDelegate: BlockAidVerificationDelegate,
@ -46,7 +46,7 @@ internal class WcSolanaSignAllTransactionUseCase @AssistedInject constructor(
).map { lce -> lce.map { result -> BlockAidTransactionCheck.Result.Plain(result) } }
override suspend fun SignCollector<List<TransactionData>>.onSign(state: WcSignState<List<TransactionData>>) {
val hash = prepareAndSign.invoke(transactionData = state.signModel, userWallet = wallet, network = network)
val hash = prepareForSend.invoke(transactionData = state.signModel, userWallet = wallet, network = network)
.onLeft { error ->
emit(state.toResult(parseSendError(error).left()))
}

View file

@ -112,7 +112,12 @@ internal class WcPairSdkDelegate : WcSdkObserver {
sessionProposal: Wallet.Model.SessionProposal,
verifyContext: Wallet.Model.VerifyContext,
) {
val sessionProposalWithRealUrl = sessionProposal.copy(url = verifyContext.origin)
val url = if (verifyContext.validation == Wallet.Model.Validation.INVALID || verifyContext.isScam == true) {
verifyContext.origin
} else {
verifyContext.origin.ifEmpty { verifyContext.verifyUrl }
}
val sessionProposalWithRealUrl = sessionProposal.copy(url = url)
// Triggered when wallet receives the session proposal sent by a Dapp
onSessionProposal.trySend(sessionProposalWithRealUrl to verifyContext)
}

View file

@ -362,4 +362,22 @@ internal enum class Wallet2CobrandImage(
cards3ResId = R.drawable.ill_ghoad_card3_120_106,
batchIds = setOf("AF89"),
),
BlushSky(
cards2ResId = R.drawable.ill_blush_sky_card2_120_106,
cards3ResId = R.drawable.ill_blush_sky_card3_120_106,
batchIds = setOf("AF990020", "AF990021", "AF990022"),
),
ElectraSea(
cards2ResId = R.drawable.ill_electra_sea_card2_120_106,
cards3ResId = R.drawable.ill_electra_sea_card3_120_106,
batchIds = setOf("AF990023", "AF990024", "AF990025"),
),
HyperBlue(
cards2ResId = R.drawable.ill_hyperblue_card2_120_106,
cards3ResId = R.drawable.ill_hyperblue_card3_120_106,
batchIds = setOf("AF990026", "AF990027", "AF990028"),
),
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB