Updated on 2026-08-14

This commit is contained in:
Tangem 2023-01-09 15:19:25 +03:00
parent 9ffebc7634
commit 6587833fad
8 changed files with 7 additions and 17 deletions

View file

@ -143,7 +143,7 @@ fun WalletManagerFactory.makeSaltPayWalletManager(
scanResponse: ScanResponse,
): EthereumWalletManager {
val blockchain = scanResponse.getBlockchain()
if (blockchain != Blockchain.SaltPay && blockchain != Blockchain.SaltPayTestnet)
if (blockchain != Blockchain.SaltPay)
throw IllegalArgumentException()
val token = SaltPayWorkaround.tokenFrom(blockchain)

View file

@ -29,9 +29,9 @@ class UserWalletBuilder(
ProductType.Note -> "Note"
ProductType.Twins -> "Twin"
ProductType.SaltPay -> "SaltPay"
ProductType.Start2Coin -> "Start2Coin"
ProductType.Wallet -> when {
card.isBackupNotAllowed -> "Tangem card"
card.isStart2Coin -> "Start2Coin"
else -> "Wallet"
}
}
@ -41,6 +41,7 @@ class UserWalletBuilder(
ProductType.Note -> false
ProductType.Twins -> false
ProductType.SaltPay -> false
ProductType.Start2Coin -> false
ProductType.Wallet -> when {
card.isStart2Coin -> false
card.firmwareVersion >= FirmwareVersion.MultiWalletAvailable -> true

View file

@ -57,6 +57,7 @@ class UserWalletIdBuilder private constructor(
ProductType.Note,
ProductType.Wallet,
ProductType.SaltPay,
ProductType.Start2Coin,
-> null
},
)

View file

@ -39,7 +39,6 @@ class GnosisRegistrator(
private val otpProcessorContractAddress: String = when (walletManager.wallet.blockchain) {
Blockchain.SaltPay -> "0x3B4397C817A26521Df8bD01a949AFDE2251d91C2"
Blockchain.SaltPayTestnet -> "0x710BF23486b549836509a08c184cE0188830f197"
else -> throw IllegalArgumentException("GnosisRegistrator supports only the SaltPay blockchain")
}