Updated on 2026-08-14
This commit is contained in:
parent
b88de49ba3
commit
664e71b782
11 changed files with 307 additions and 4 deletions
|
|
@ -2,7 +2,9 @@ package com.tangem.common.test.domain.walletmanager
|
|||
|
||||
import com.tangem.blockchainsdk.models.UpdateWalletManagerResult
|
||||
import com.tangem.blockchainsdk.models.UpdateWalletManagerResult.*
|
||||
import com.tangem.domain.models.currency.CryptoCurrency
|
||||
import com.tangem.domain.models.network.TxInfo
|
||||
import com.tangem.domain.models.yield.supply.YieldSupplyStatus
|
||||
import java.math.BigDecimal
|
||||
|
||||
/**
|
||||
|
|
@ -41,6 +43,41 @@ class MockUpdateWalletManagerResultFactory {
|
|||
)
|
||||
}
|
||||
|
||||
fun createVerifiedWithToken(): Verified {
|
||||
return Verified(
|
||||
selectedAddress = "0x1",
|
||||
addresses = setOf(Address(value = "0x1", type = Address.Type.Primary)),
|
||||
currenciesAmounts = setOf(
|
||||
CryptoCurrencyAmount.Token.BasicToken(
|
||||
value = BigDecimal.ONE,
|
||||
currencyRawId = CryptoCurrency.RawID("token"),
|
||||
contractAddress = "0xTokenAddress",
|
||||
),
|
||||
),
|
||||
currentTransactions = setOf(CryptoCurrencyTransaction.Coin(txInfo)),
|
||||
)
|
||||
}
|
||||
|
||||
fun createVerifiedWithSuppliedToken(): Verified {
|
||||
return Verified(
|
||||
selectedAddress = "0x1",
|
||||
addresses = setOf(Address(value = "0x1", type = Address.Type.Primary)),
|
||||
currenciesAmounts = setOf(
|
||||
CryptoCurrencyAmount.Token.YieldSupplyToken(
|
||||
value = BigDecimal.ONE,
|
||||
currencyRawId = CryptoCurrency.RawID("token"),
|
||||
contractAddress = "0xTokenAddress",
|
||||
yieldSupplyStatus = YieldSupplyStatus(
|
||||
isActive = true,
|
||||
isInitialized = true,
|
||||
isAllowedToSpend = false,
|
||||
),
|
||||
),
|
||||
),
|
||||
currentTransactions = setOf(CryptoCurrencyTransaction.Coin(txInfo)),
|
||||
)
|
||||
}
|
||||
|
||||
private companion object {
|
||||
|
||||
val txInfo = TxInfo(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue