Skip to content

Commit

Permalink
move client from $ to _ meta
Browse files Browse the repository at this point in the history
  • Loading branch information
jonesmac committed Dec 10, 2024
1 parent 58bdf00 commit 63bcd7f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class BoundWitnessTest {
val bw = BoundWitnessBuilder().signer(Account.random()).payloads(listOf(
TestPayload1()
)).build()
assert(bw.__client == "android")
assert(bw._client == "android")
assert(bw.__signatures.size == 1)
}
}
Expand All @@ -92,7 +92,7 @@ class BoundWitnessTest {
)).build()
val serializedBw = JsonSerializable.toJson(bw)
val bwJson = JSONObject(serializedBw)
assert(bwJson.get("\$client") == "android")
assert(bwJson.get("_client") == "android")
assertNotNull(bwJson.get("\$signatures"))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import network.xyo.client.boundwitness.model.BoundWitnessMeta
@JsonClass(generateAdapter = true)
open class BoundWitness(client: String? = "android", signatures: List<String> = emptyList()) : BoundWitnessMeta,
BoundWitnessFields() {
@Json(name = "\$client")
final override var __client: String? = client
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,6 @@ package network.xyo.client.boundwitness.model
import java.io.Serializable

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

0 comments on commit 63bcd7f

Please sign in to comment.