Skip to content

Commit

Permalink
updo - seems to have trouble round tripping bw
Browse files Browse the repository at this point in the history
  • Loading branch information
arietrouw committed Jan 24, 2025
1 parent 63bcd7f commit bb068f5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class BoundWitnessTest {
val bw = BoundWitnessBuilder().signer(Account.random()).payloads(listOf(
TestPayload1()
)).build()
assert(bw._client == "android")
assert(bw.__signatures.size == 1)
}
}
Expand Down Expand Up @@ -126,15 +125,15 @@ class BoundWitnessTest {
@Test
fun testBoundWitnessRoundTripToArchivist() {
runBlocking {
val client = ArchivistWrapper(NodeClient("$apiDomainBeta/Archivist", null, appContext))
val client = ArchivistWrapper(NodeClient("$apiDomainLocal/Archivist", null, appContext))
val testAccount = Account.random()
val testPayload = TestPayload1()
val bw = BoundWitnessBuilder().signer(testAccount).payloads(listOf(testPayload)).build()
val bwJson: String = bw.toJson()
println("bwJson-start")
println(bwJson)
println("bwJson-end")
val queryResult = client.insert(listOf(testPayload))
val queryResult = client.insert(listOf(bw))

assert((queryResult.errors?.size ?: 0) == 0)
assert(((queryResult.response?.payloads?.size ?: 0) > 0))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import network.xyo.client.boundwitness.model.BoundWitnessMeta
@JsonClass(generateAdapter = true)
open class BoundWitness(client: String? = "android", signatures: List<String> = emptyList()) : BoundWitnessMeta,
BoundWitnessFields() {
final override var _client: String? = client

@Json(name = "\$signatures")
final override var __signatures = signatures
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ package network.xyo.client.boundwitness.model
import java.io.Serializable

interface BoundWitnessMeta: Serializable {
var _client: String?
var __signatures: List<String>
}

0 comments on commit bb068f5

Please sign in to comment.