diff --git a/sdk/src/androidTest/java/network/xyo/client/NodeClientTest.kt b/sdk/src/androidTest/java/network/xyo/client/NodeClientTest.kt index b4aaaed..f648600 100644 --- a/sdk/src/androidTest/java/network/xyo/client/NodeClientTest.kt +++ b/sdk/src/androidTest/java/network/xyo/client/NodeClientTest.kt @@ -1,11 +1,14 @@ package network.xyo.client +import android.content.Context +import androidx.test.platform.app.InstrumentationRegistry import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.runBlocking import network.xyo.client.account.Account import network.xyo.client.archivist.wrapper.ArchivistWrapper import network.xyo.client.node.client.NodeClient import network.xyo.client.payload.XyoPayload +import org.junit.Before import org.junit.Test import org.junit.jupiter.api.Assertions.* @@ -16,15 +19,23 @@ class DiscoverPayload(): XyoPayload() { class NodeClientTest { private val apiDomainBeta = "${TestConstants.nodeUrlBeta}/Archivist" + private lateinit var appContext: Context + + @Before + fun useAppContext() { + // Context of the app under test. + this.appContext = InstrumentationRegistry.getInstrumentation().targetContext + } + @OptIn(ExperimentalCoroutinesApi::class) @Test fun discoverTestBeta() { val account = Account.random() - val client = NodeClient(TestConstants.nodeUrlBeta, account) + val client = NodeClient(TestConstants.nodeUrlBeta, account, appContext) val query = DiscoverPayload() runBlocking { - val postResult = client.query(query, null, null) + val postResult = client.query(query, null) assertEquals(null, postResult.errors) } } @@ -46,12 +57,12 @@ class NodeClientTest { @Test fun archivistInsertTest() { - val archivist = ArchivistWrapper(NodeClient(apiDomainBeta, TestConstants.TestAccount)) + val archivist = ArchivistWrapper(NodeClient(apiDomainBeta, TestConstants.TestAccount, appContext)) val payloads = arrayListOf(TestConstants.debugPayload) runBlocking { - val (response, errors) = archivist.insert(payloads, null) + val (response, errors) = archivist.insert(payloads) assertNotEquals(response, null) assertEquals(errors, null) @@ -63,7 +74,7 @@ class NodeClientTest { } runBlocking { - val getResult = archivist.get(arrayListOf(TestConstants.debugPayloadHash), null) + val getResult = archivist.get(arrayListOf(TestConstants.debugPayloadHash)) assertNotEquals(getResult.response, null) val response = getResult.response diff --git a/sdk/src/androidTest/java/network/xyo/client/XyoBoundWitnessTest.kt b/sdk/src/androidTest/java/network/xyo/client/XyoBoundWitnessTest.kt index cc71685..6cfed49 100644 --- a/sdk/src/androidTest/java/network/xyo/client/XyoBoundWitnessTest.kt +++ b/sdk/src/androidTest/java/network/xyo/client/XyoBoundWitnessTest.kt @@ -7,6 +7,7 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.runBlocking import network.xyo.client.account.Account import network.xyo.client.boundwitness.XyoBoundWitnessBuilder +import network.xyo.client.datastore.previous_hash_store.PreviousHashStorePrefsRepository import network.xyo.client.node.client.NodeClient import network.xyo.client.payload.XyoPayload import org.junit.Before @@ -34,9 +35,14 @@ class XyoBoundWitnessTest { this.appContext = InstrumentationRegistry.getInstrumentation().targetContext } + @Before + fun setupAccount() { + Account.previousHashStore = PreviousHashStorePrefsRepository.getInstance(InstrumentationRegistry.getInstrumentation().targetContext) + } + fun generateQuery(nodeUrl: String): RequestDependencies { val account = Account.random() - val client = NodeClient(nodeUrl, account) + val client = NodeClient(nodeUrl, account, appContext) val query = DiscoverPayload() val payloads = mutableListOf() payloads.add(TestPayload1()) @@ -47,7 +53,7 @@ class XyoBoundWitnessTest { fun testSendQueryBW(nodeUrl: String) { runBlocking { val(client, query, payloads) = generateQuery(nodeUrl) - val postResult = client.query(query, payloads, null) + val postResult = client.query(query, payloads) assertEquals(null, postResult.errors) } } @@ -66,11 +72,21 @@ class XyoBoundWitnessTest { @Test fun testBoundWitnessHash() { runBlocking { - val bw = XyoBoundWitnessBuilder().signer(Account.random()).payloads(listOf(TestPayload1())).build() + val bw = XyoBoundWitnessBuilder(appContext).signer(Account.random()).payloads(listOf(TestPayload1())).build() val hashableFields = bw.getBodyJson() assert(bw._hash !== null) assert(bw._hash!! == XyoSerializable.sha256String(hashableFields)) assert(bw._hash!! == hashableFields.hash()) } } + + @Test + fun testBoundWitnessPreviousHash() { + runBlocking { + val testAccount = Account.random() + val bw = XyoBoundWitnessBuilder(appContext).signer(testAccount).payloads(listOf(TestPayload1())).build() + val bw2 = XyoBoundWitnessBuilder(appContext).signer(testAccount).payloads(listOf(TestPayload1())).build() + assert(bw2.previous_hashes.contains(bw._hash)) + } + } } \ No newline at end of file diff --git a/sdk/src/androidTest/java/network/xyo/client/XyoPanelTest.kt b/sdk/src/androidTest/java/network/xyo/client/XyoPanelTest.kt index 8e98967..c03445f 100644 --- a/sdk/src/androidTest/java/network/xyo/client/XyoPanelTest.kt +++ b/sdk/src/androidTest/java/network/xyo/client/XyoPanelTest.kt @@ -65,7 +65,7 @@ class XyoPanelTest { runBlocking { val witnessAccount = Account.fromPrivateKey("9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08") val witness2Account = Account.fromPrivateKey("5a95531488b4d0d3645aea49678297ae9e2034879ce0389b80eb788e8b533592") - val witness = XyoWitness(witnessAccount, fun(_: Context, _: String?): List { + val witness = XyoWitness(witnessAccount, fun(_: Context): List { return listOf(BasicPayload()) }) val panel = XyoPanel(appContext, Account.random(), arrayListOf(Pair(nodeUrl, Account.random())), listOf(witness, XyoSystemInfoWitness(witness2Account), XyoLocationWitness())) @@ -94,7 +94,7 @@ class XyoPanelTest { @Test fun testSimplePanelReport() { runBlocking { - val panel = XyoPanel(appContext, Account.random(), fun(_:Context, _: String?): List { + val panel = XyoPanel(appContext, Account.random(), fun(_:Context): List { return listOf(XyoEventPayload("test_event")) }) val result = panel.reportAsyncQuery() diff --git a/sdk/src/androidTest/java/network/xyo/client/XyoPayloadTest.kt b/sdk/src/androidTest/java/network/xyo/client/XyoPayloadTest.kt index 483506c..d97ffa8 100644 --- a/sdk/src/androidTest/java/network/xyo/client/XyoPayloadTest.kt +++ b/sdk/src/androidTest/java/network/xyo/client/XyoPayloadTest.kt @@ -93,14 +93,14 @@ class XyoPayloadTest { @Test fun testRoundTripPanel() { val address = Account.fromPrivateKey("5a95531488b4d0d3645aea49678297ae9e2034879ce0389b80eb788e8b533592") - val witness = XyoWitness(address, fun(_: Context, _: String?): List { + val witness = XyoWitness(address, fun(_: Context): List { return listOf(BasicPayload()) }) CoroutineScope(Dispatchers.Main).launch { val response = arrayListOf(witness.observe(appContext)) val payloads = response.mapNotNull { payload -> payload }.flatten() - val bwJson = XyoBoundWitnessBuilder() + val bwJson = XyoBoundWitnessBuilder(appContext) .payloads(payloads) .signer(Account.random()) .build() diff --git a/sdk/src/androidTest/java/network/xyo/client/prefs/AccountPrefsRepositoryTest.kt b/sdk/src/androidTest/java/network/xyo/client/prefs/AccountPrefsRepositoryTest.kt index 91b8f2e..752e8f0 100644 --- a/sdk/src/androidTest/java/network/xyo/client/prefs/AccountPrefsRepositoryTest.kt +++ b/sdk/src/androidTest/java/network/xyo/client/prefs/AccountPrefsRepositoryTest.kt @@ -131,7 +131,7 @@ class AccountPrefsRepositoryTest { assertEquals(firstAccount.privateKey.toHexString(), testAccount.privateKey.toHexString()) // Sign with the test account - val firstBw = XyoBoundWitnessBuilder().signer(firstAccount).payloads(listOf( + val firstBw = XyoBoundWitnessBuilder(appContext).signer(firstAccount).payloads(listOf( TestConstants.debugPayload )).build() val firstAddress = firstBw.addresses.first() @@ -141,7 +141,7 @@ class AccountPrefsRepositoryTest { val secondAccount = secondInstance.getAccount() // Sign with the test account - val secondBw = XyoBoundWitnessBuilder().signer(secondAccount).payloads(listOf( + val secondBw = XyoBoundWitnessBuilder(appContext).signer(secondAccount).payloads(listOf( TestConstants.debugPayload )).build() val secondAddress = secondBw.addresses.first() diff --git a/sdk/src/main/java/network/xyo/client/XyoPanel.kt b/sdk/src/main/java/network/xyo/client/XyoPanel.kt index 23c793a..21c3e21 100644 --- a/sdk/src/main/java/network/xyo/client/XyoPanel.kt +++ b/sdk/src/main/java/network/xyo/client/XyoPanel.kt @@ -29,7 +29,6 @@ class XyoPanel( private val witnesses: List>?, private val nodeUrlsAndAccounts: ArrayList>? ) { - var previousHash: String? = null private var nodes: MutableList? = null var defaultAccount: AccountInstance? = null @@ -80,7 +79,7 @@ class XyoPanel( constructor( context: Context, account: AccountInstance, - observe: ((context: Context, previousHash: String?) -> List?)? + observe: ((context: Context) -> List?)? ): this( context, account, @@ -96,7 +95,7 @@ class XyoPanel( this@XyoPanel.nodeUrlsAndAccounts.forEach { pair -> val nodeUrl = pair.first val account = pair.second ?: defaultAccount - it.add(NodeClient(nodeUrl, account)) + it.add(NodeClient(nodeUrl, account, context)) } it } @@ -114,7 +113,7 @@ class XyoPanel( suspend fun eventAsync(event: String): XyoPanelReportResult { val adhocWitnessList = listOf( XyoWitness({ - _, previousHash -> listOf(XyoEventPayload(event)) + _, -> listOf(XyoEventPayload(event)) }) ) return this.reportAsync(adhocWitnessList) @@ -124,7 +123,7 @@ class XyoPanel( suspend fun eventAsyncQuery(event: String): XyoPanelReportQueryResult { val adhocWitnessList = listOf( XyoWitness({ - _, previousHash -> listOf(XyoEventPayload(event)) + _, -> listOf(XyoEventPayload(event)) }) ) return reportAsyncQuery(adhocWitnessList) @@ -147,10 +146,10 @@ class XyoPanel( private suspend fun generateBoundWitnessJson(adhocWitnesses: List> = emptyList()): XyoBoundWitnessJson { val witnesses: List> = (this.witnesses ?: emptyList()).plus(adhocWitnesses) val payloads = generatePayloads() - return XyoBoundWitnessBuilder() + return XyoBoundWitnessBuilder(context) .payloads(payloads) .signer(account) - .build(previousHash) + .build() } @@ -167,7 +166,6 @@ class XyoPanel( @kotlinx.coroutines.ExperimentalCoroutinesApi suspend fun reportAsync(adhocWitnesses: List> = emptyList()): XyoPanelReportResult { val bw = generateBoundWitnessJson(adhocWitnesses) - previousHash = bw._hash val results = mutableListOf() archivists?.forEach { archivist -> results.add(archivist.postBoundWitnessAsync(bw)) @@ -179,7 +177,6 @@ class XyoPanel( suspend fun reportAsyncQuery(adhocWitnesses: List> = emptyList()): XyoPanelReportQueryResult { if (nodes == null) resolveNodes() val bw = generateBoundWitnessJson() - previousHash = bw._hash val payloads = generatePayloads(adhocWitnesses) val results = mutableListOf() @@ -190,7 +187,7 @@ class XyoPanel( nodes?.forEach { node -> val archivist = ArchivistWrapper(node) val payloadsWithBoundWitness = payloads.plus(bw) - val queryResult = archivist.insert(payloadsWithBoundWitness, previousHash) + val queryResult = archivist.insert(payloadsWithBoundWitness) results.add(queryResult) } return XyoPanelReportQueryResult(bw, results, payloads) diff --git a/sdk/src/main/java/network/xyo/client/XyoWitness.kt b/sdk/src/main/java/network/xyo/client/XyoWitness.kt index af39317..59050d7 100644 --- a/sdk/src/main/java/network/xyo/client/XyoWitness.kt +++ b/sdk/src/main/java/network/xyo/client/XyoWitness.kt @@ -8,37 +8,34 @@ import network.xyo.client.account.model.AccountInstance import network.xyo.client.payload.XyoPayload abstract class DeferredObserver { - abstract suspend fun deferredDetect(context: Context, previousHash: String?): List? + abstract suspend fun deferredDetect(context: Context): List? } @RequiresApi(Build.VERSION_CODES.M) open class XyoWitness ( val address: AccountInstance = Account.random(), - private val observer: ((context: Context, previousHash: String) -> List?)? = null, - var previousHash: String = "", + private val observer: ((context: Context) -> List?)? = null, val deferredObserver: DeferredObserver? = null ) { constructor( - observer: ((context: Context, previousHash: String) -> List?)?, - previousHash: String = "", + observer: ((context: Context) -> List?)?, account: AccountInstance = Account.random() - ): this(account, observer, previousHash, null) + ): this(account, observer) constructor( observer: DeferredObserver?, - previousHash: String = "", account: AccountInstance = Account.random() - ): this(account, null, previousHash, observer) + ): this(account, null, observer) open suspend fun observe(context: Context): List? { val appContext = context.applicationContext if (deferredObserver !== null) { - val payload = deferredObserver.deferredDetect(appContext, previousHash) + val payload = deferredObserver.deferredDetect(appContext) return payload } observer?.let { - val payloads = it(appContext, previousHash) + val payloads = it(appContext) return payloads } return null diff --git a/sdk/src/main/java/network/xyo/client/archivist/wrapper/ArchivistWrapper.kt b/sdk/src/main/java/network/xyo/client/archivist/wrapper/ArchivistWrapper.kt index 05e311d..c92710a 100644 --- a/sdk/src/main/java/network/xyo/client/archivist/wrapper/ArchivistWrapper.kt +++ b/sdk/src/main/java/network/xyo/client/archivist/wrapper/ArchivistWrapper.kt @@ -10,15 +10,15 @@ import network.xyo.client.payload.XyoPayload open class ArchivistWrapper(private val nodeClient: NodeClient) { @OptIn(ExperimentalCoroutinesApi::class) @RequiresApi(Build.VERSION_CODES.M) - suspend fun get(hashes: List, previousHash: String?): PostQueryResult { + suspend fun get(hashes: List): PostQueryResult { val query = ArchivistGetQueryPayload(hashes) - return nodeClient.query(query, null, previousHash) + return nodeClient.query(query, null) } @OptIn(ExperimentalCoroutinesApi::class) @RequiresApi(Build.VERSION_CODES.M) - suspend fun insert(payloads: List, previousHash: String?): PostQueryResult { + suspend fun insert(payloads: List): PostQueryResult { val query = ArchivistInsertQueryPayload() - return nodeClient.query(query, payloads, previousHash) + return nodeClient.query(query, payloads) } } \ No newline at end of file diff --git a/sdk/src/main/java/network/xyo/client/boundwitness/QueryBoundWitnessBuilder.kt b/sdk/src/main/java/network/xyo/client/boundwitness/QueryBoundWitnessBuilder.kt index 1dd2925..d485e65 100644 --- a/sdk/src/main/java/network/xyo/client/boundwitness/QueryBoundWitnessBuilder.kt +++ b/sdk/src/main/java/network/xyo/client/boundwitness/QueryBoundWitnessBuilder.kt @@ -1,5 +1,6 @@ package network.xyo.client.boundwitness +import android.content.Context import android.os.Build import androidx.annotation.RequiresApi import network.xyo.client.XyoSerializable @@ -8,7 +9,7 @@ import network.xyo.client.payload.XyoPayload @RequiresApi(Build.VERSION_CODES.M) -class QueryBoundWitnessBuilder : XyoBoundWitnessBuilder() { +class QueryBoundWitnessBuilder(context: Context) : XyoBoundWitnessBuilder(context) { private lateinit var queryHash: String fun query(query: XyoPayload): QueryBoundWitnessBuilder { @@ -27,13 +28,12 @@ class QueryBoundWitnessBuilder : XyoBoundWitnessBuilder() { return this } - override suspend fun build(previousHash: String?): QueryBoundWitnessJson { + override suspend fun build(): QueryBoundWitnessJson { bw = QueryBoundWitnessJson() // override to support additional properties for query bound witnesses return bw.let { val qbw = it as QueryBoundWitnessJson qbw.query = this.queryHash - qbw._previous_hash = previousHash constructFields() it } diff --git a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessBuilder.kt b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessBuilder.kt index b2c978b..f5bfd63 100644 --- a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessBuilder.kt +++ b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessBuilder.kt @@ -1,15 +1,17 @@ package network.xyo.client.boundwitness +import android.content.Context import android.os.Build import androidx.annotation.RequiresApi import network.xyo.client.XyoSerializable import network.xyo.client.account.hexStringToByteArray import network.xyo.client.account.model.AccountInstance +import network.xyo.client.datastore.previous_hash_store.PreviousHashStorePrefsRepository import network.xyo.client.payload.XyoPayload import network.xyo.client.payload.XyoValidationException @RequiresApi(Build.VERSION_CODES.M) -open class XyoBoundWitnessBuilder { +open class XyoBoundWitnessBuilder(private val context: Context) { protected var _signers = mutableListOf() protected var _payload_hashes = mutableListOf() protected var _payload_schemas = mutableListOf() @@ -32,10 +34,16 @@ open class XyoBoundWitnessBuilder { return this } - private fun hashableFields(): XyoBoundWitnessBodyJson { + @OptIn(ExperimentalStdlibApi::class) + private suspend fun hashableFields(): XyoBoundWitnessBodyJson { // if a timestamp is not provided, set one at the time hashable fields are set bw.timestamp = _timestamp ?: System.currentTimeMillis() + bw.previous_hashes = addresses.map { + val store = PreviousHashStorePrefsRepository.getInstance(context) + store.getItem(hexStringToByteArray(it))?.toHexString() + } + // return the body with hashable fields return bw.getBodyJson() } @@ -88,11 +96,8 @@ open class XyoBoundWitnessBuilder { bw._hash = hash } - open suspend fun build(previousHash: String? = null): XyoBoundWitnessJson { + open suspend fun build(): XyoBoundWitnessJson { return bw.let{ - // store the previous hash on the class - it._previous_hash = previousHash - // update fields constructFields() it diff --git a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessJson.kt b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessJson.kt index 2392da7..4fda7ac 100644 --- a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessJson.kt +++ b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessJson.kt @@ -6,7 +6,6 @@ import com.squareup.moshi.JsonClass open class XyoBoundWitnessJson: XyoBoundWitnessBodyJson(), XyoBoundWitnessMetaInterface { override var _signatures: List? = null override var _client: String? = null - override var _previous_hash: String? = null override var _hash: String? = null open fun getBodyJson(): XyoBoundWitnessBodyJson { diff --git a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessMetaInterface.kt b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessMetaInterface.kt index 37aa55a..4efdfd9 100644 --- a/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessMetaInterface.kt +++ b/sdk/src/main/java/network/xyo/client/boundwitness/XyoBoundWitnessMetaInterface.kt @@ -6,5 +6,4 @@ interface XyoBoundWitnessMetaInterface : Payload { var _hash: String? var _signatures: List? var _client: String? - var _previous_hash: String? } \ No newline at end of file diff --git a/sdk/src/main/java/network/xyo/client/node/client/NodeClient.kt b/sdk/src/main/java/network/xyo/client/node/client/NodeClient.kt index d5c0188..648a0f6 100644 --- a/sdk/src/main/java/network/xyo/client/node/client/NodeClient.kt +++ b/sdk/src/main/java/network/xyo/client/node/client/NodeClient.kt @@ -1,5 +1,6 @@ package network.xyo.client.node.client +import android.content.Context import android.os.Build import android.util.Log import androidx.annotation.RequiresApi @@ -22,8 +23,7 @@ import org.json.JSONObject import java.io.IOException @RequiresApi(Build.VERSION_CODES.M) -class NodeClient(private val url: String, private val accountToUse: AccountInstance?) { - +class NodeClient(private val url: String, private val accountToUse: AccountInstance?, private val context: Context) { private val _internalAccount = Account.random() private val okHttp = OkHttpClient() @@ -39,8 +39,8 @@ class NodeClient(private val url: String, private val accountToUse: AccountInsta @ExperimentalCoroutinesApi @RequiresApi(Build.VERSION_CODES.M) - suspend fun query(query: XyoPayload, payloads: List?, previousHash: String?): PostQueryResult { - val bodyString = buildQuery(query, payloads, previousHash) + suspend fun query(query: XyoPayload, payloads: List?): PostQueryResult { + val bodyString = buildQuery(query, payloads) val postBody = bodyString.toRequestBody(MEDIA_TYPE_JSON) val request = Request.Builder() .url(url) @@ -81,20 +81,20 @@ class NodeClient(private val url: String, private val accountToUse: AccountInsta } @RequiresApi(Build.VERSION_CODES.M) - private suspend fun buildQuery(query: XyoPayload, payloads: List?, previousHash: String?): String { - val builtQuery = queryBuilder(query, payloads, previousHash) + private suspend fun buildQuery(query: XyoPayload, payloads: List?): String { + val builtQuery = queryBuilder(query, payloads) val queryPayloads = buildQueryPayloads(query, payloads) val queryPayloadsJsonArray = queryPayloadsJsonArray(queryPayloads) val builtQueryTuple = arrayListOf(XyoSerializable.toJson((builtQuery)), queryPayloadsJsonArray.toString()) return builtQueryTuple.joinToString(",", "[", "]") } - private suspend fun queryBuilder(query: XyoPayload, payloads: List?, previousHash: String?): QueryBoundWitnessJson { - return QueryBoundWitnessBuilder().let { + private suspend fun queryBuilder(query: XyoPayload, payloads: List?): QueryBoundWitnessJson { + return QueryBoundWitnessBuilder(context).let { payloads?.let { payload -> it.payloads(payload) } - it.signer(this.account).query(query).build(previousHash) + it.signer(this.account).query(query).build() } } diff --git a/sdk/src/main/java/network/xyo/client/witness/location/info/XyoLocationWitness.kt b/sdk/src/main/java/network/xyo/client/witness/location/info/XyoLocationWitness.kt index 53d381f..f06f05e 100644 --- a/sdk/src/main/java/network/xyo/client/witness/location/info/XyoLocationWitness.kt +++ b/sdk/src/main/java/network/xyo/client/witness/location/info/XyoLocationWitness.kt @@ -12,7 +12,6 @@ import network.xyo.client.account.model.AccountInstance class DeferredLocationObserver : DeferredObserver() { override suspend fun deferredDetect( context: Context, - previousHash: String? ): List? { try { return listOf(XyoLocationPayload.detect(context)) @@ -26,6 +25,5 @@ class DeferredLocationObserver : DeferredObserver() { @RequiresApi(Build.VERSION_CODES.M) class XyoLocationWitness(address: AccountInstance = Account.random()) : XyoWitness( DeferredLocationObserver(), - "", address - ) \ No newline at end of file +) \ No newline at end of file diff --git a/sdk/src/main/java/network/xyo/client/witness/system/info/XyoSystemInfoWitness.kt b/sdk/src/main/java/network/xyo/client/witness/system/info/XyoSystemInfoWitness.kt index 0a1d762..1193cee 100644 --- a/sdk/src/main/java/network/xyo/client/witness/system/info/XyoSystemInfoWitness.kt +++ b/sdk/src/main/java/network/xyo/client/witness/system/info/XyoSystemInfoWitness.kt @@ -9,9 +9,8 @@ import network.xyo.client.account.model.AccountInstance @RequiresApi(Build.VERSION_CODES.M) class XyoSystemInfoWitness(address: AccountInstance = Account.random()) : XyoWitness( - fun (context: Context, _: String?): List { + fun (context: Context): List { return listOf(XyoSystemInfoPayload.detect(context)) }, - "", address ) \ No newline at end of file