Updated on 2026-08-14

This commit is contained in:
Tangem 2025-09-12 14:02:21 +05:00
parent b88de49ba3
commit 664e71b782
11 changed files with 307 additions and 4 deletions

View file

@ -42,7 +42,10 @@ class NetworkStatusDMSerializationTest {
{ "value": "0x123456", "type": "primary" },
{ "value": "0xabcdef", "type": "secondary" }
],
"amounts": { "ETH": "1.2345" }
"amounts": { "ETH": "1.2345" },
"yield_supply_statuses": {
"ETH": { "is_active": false, "is_initialized": false, "is_allowed_to_spend": false }
}
}
""".trimIndent()
@ -62,6 +65,13 @@ class NetworkStatusDMSerializationTest {
NetworkStatusDM.Address("0xabcdef", NetworkStatusDM.Address.Type.Secondary),
),
amounts = mapOf("ETH" to BigDecimal("1.2345")),
yieldSupplyStatuses = mapOf(
"ETH" to NetworkStatusDM.YieldSupplyStatus(
isActive = false,
isInitialized = false,
isAllowedToSpend = false,
),
),
)
Truth.assertThat(result).isEqualTo(expected)
@ -82,6 +92,13 @@ class NetworkStatusDMSerializationTest {
NetworkStatusDM.Address("0xabcdef", NetworkStatusDM.Address.Type.Secondary),
),
amounts = mapOf("ETH" to BigDecimal("1.2345")),
yieldSupplyStatuses = mapOf(
"ETH" to NetworkStatusDM.YieldSupplyStatus(
isActive = false,
isInitialized = false,
isAllowedToSpend = false,
),
),
)
// Act
@ -100,7 +117,10 @@ class NetworkStatusDMSerializationTest {
{ "value": "0x123456", "type": "primary" },
{ "value": "0xabcdef", "type": "secondary" }
],
"amounts": { "ETH": "1.2345" }
"amounts": { "ETH": "1.2345" },
"yield_supply_statuses": {
"ETH": { "is_active": false, "is_initialized": false, "is_allowed_to_spend": false }
}
}
""".stripJsonWhitespace()