Updated on 2026-08-14

This commit is contained in:
Tangem 2025-05-07 15:44:38 +05:00
parent ad8d026e40
commit 4b4b140182
9 changed files with 181 additions and 32 deletions

View file

@ -43,7 +43,7 @@ internal class DefaultNFTPersistenceStore(
override suspend fun saveSalePrice(assetId: NFTAsset.Identifier, salePrice: NFTAsset.SalePrice) {
pricesPersistenceStore.updateData {
it.toMutableList().plus(NFTPriceId(assetId = assetId, price = salePrice))
it.toMutableList() + NFTPriceId(assetId = assetId, price = salePrice)
}
}

View file

@ -5,14 +5,16 @@ import com.tangem.domain.nft.models.NFTSalePrice
import com.tangem.utils.converter.TwoWayConverter
import com.tangem.blockchain.nft.models.NFTAsset.SalePrice as SDKSalePrice
internal class NFTSdkAssetSalePriceConverter(
class NFTSdkAssetSalePriceConverter(
private val assetId: NFTAsset.Identifier,
) : TwoWayConverter<SDKSalePrice, NFTSalePrice.Value> {
override fun convert(value: SDKSalePrice): NFTSalePrice.Value {
return NFTSalePrice.Value(
assetId = assetId,
fiatValue = null,
value = value.value,
symbol = value.symbol,
symbol = value.symbol.orEmpty(),
decimals = value.decimals ?: 0,
)
}
@ -20,6 +22,7 @@ internal class NFTSdkAssetSalePriceConverter(
return SDKSalePrice(
symbol = value.symbol,
value = value.value,
decimals = value.decimals,
)
}
}