This repository was archived by the owner on Mar 26, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
data/repositories/src/main/kotlin/com/gemwallet/android/data/repositoreis/device
gemcore/src/main/kotlin/com/wallet/core/primitives Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import com.gemwallet.android.data.service.store.ConfigStore
2121import com.gemwallet.android.data.services.gemapi.GemDeviceApiClient
2222import com.gemwallet.android.ext.model
2323import com.gemwallet.android.ext.os
24+ import com.wallet.core.primitives.AddressChains
2425import com.wallet.core.primitives.ChainAddress
2526import com.wallet.core.primitives.Device
2627import com.wallet.core.primitives.MigrateDeviceIdRequest
@@ -231,9 +232,10 @@ class DeviceRepository(
231232
232233 private fun localSubscriptions (wallets : List <Wallet >): List <WalletSubscription > {
233234 return wallets.map { wallet ->
234- val subscriptions = wallet.accounts.map { account ->
235- ChainAddress (account.chain, account.address)
236- }
235+ val subscriptions = wallet.accounts.groupBy { account -> account.address }
236+ .map { entry ->
237+ AddressChains (entry.key, entry.value.map { it.chain })
238+ }
237239 WalletSubscription (
238240 walletId = wallet.id,
239241 source = wallet.source,
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import kotlinx.serialization.SerialName
1111data class AddressName (
1212 val chain : Chain ,
1313 val address : String ,
14- val name : String
14+ val name : String ,
15+ val type : AddressType ? = null
1516)
1617
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ enum class AddressType(val string: String) {
1515 Contract (" contract" ),
1616 @SerialName(" validator" )
1717 Validator (" validator" ),
18+ @SerialName(" contact" )
19+ Contact (" contact" ),
1820}
1921
2022@Serializable
Original file line number Diff line number Diff line change @@ -7,11 +7,17 @@ package com.wallet.core.primitives
77import kotlinx.serialization.Serializable
88import kotlinx.serialization.SerialName
99
10+ @Serializable
11+ data class AddressChains (
12+ val address : String ,
13+ val chains : List <Chain >
14+ )
15+
1016@Serializable
1117data class WalletSubscription (
1218 val walletId : String ,
1319 val source : WalletSource ? = null ,
14- val subscriptions : List <ChainAddress >
20+ val subscriptions : List <AddressChains >
1521)
1622
1723@Serializable
You can’t perform that action at this time.
0 commit comments