Skip to content

Commit

Permalink
fix up the test helper
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Jan 23, 2024
1 parent 9bbee43 commit 14b3870
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions library/src/test/java/org/xmtp/android/library/TestHelpers.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,23 @@ class FakeWallet : SigningKey {
}
}

override val address: String
get() = privateKey.walletAddress

override suspend fun sign(data: ByteArray): Signature {
val signature = privateKeyBuilder.sign(data)
return signature
}

override fun sign(text: String): ByteArray {
return privateKeyBuilder.sign(text)
}

override suspend fun signLegacy(message: String): Signature {
val signature = privateKeyBuilder.signLegacy(message)
return signature
}

override fun getAddress(): String {
return privateKey.walletAddress
}
}

class FakeStreamHolder {
Expand Down Expand Up @@ -170,6 +175,7 @@ class FakeApiClient : ApiClient {
MessageApiOuterClass.SortDirection.SORT_DIRECTION_ASCENDING -> {
result = result.reversed().toMutableList()
}

else -> Unit
}
}
Expand Down

0 comments on commit 14b3870

Please sign in to comment.