fix(android): resolve compilation errors for walletName and Participant

- TssRepository: Use address-based wallet name since ShareRecordEntity
  doesn't have wallet_name field (unlike Electron's ShareRecord)
- MainViewModel: Add missing Participant import and simplify type reference

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-01-01 11:00:36 -08:00
parent 04eeadf7a7
commit ee1cfe082d
2 changed files with 5 additions and 2 deletions

View File

@ -1695,9 +1695,11 @@ class TssRepository @Inject constructor(
}
// Build request body matching account-service API
// Note: Android ShareRecordEntity doesn't store wallet_name, use address-based name
val walletName = "Wallet ${shareEntity.address.take(8)}...${shareEntity.address.takeLast(4)}"
val requestBody = com.google.gson.JsonObject().apply {
addProperty("keygen_session_id", shareEntity.sessionId)
addProperty("wallet_name", shareEntity.walletName)
addProperty("wallet_name", walletName)
addProperty("message_hash", messageHash)
add("parties", partiesArray)
addProperty("threshold_t", shareEntity.thresholdT)

View File

@ -3,6 +3,7 @@ package com.durian.tssparty.presentation.viewmodel
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.durian.tssparty.data.repository.JoinKeygenViaGrpcResult
import com.durian.tssparty.data.repository.Participant
import com.durian.tssparty.data.repository.TssRepository
import com.durian.tssparty.domain.model.*
import com.durian.tssparty.util.AddressUtils
@ -1221,7 +1222,7 @@ data class CoSignSessionInfo(
val thresholdT: Int,
val thresholdN: Int,
val currentParticipants: Int,
val parties: List<com.durian.tssparty.data.repository.Participant> = emptyList() // Complete parties list from API
val parties: List<Participant> = emptyList() // Complete parties list from API
)
/**