Skip to content

Commit

Permalink
renable history sync
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Dec 5, 2024
1 parent a064b15 commit fbfa0ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import org.junit.runner.RunWith
import org.xmtp.android.library.messages.PrivateKeyBuilder
import org.xmtp.android.library.messages.walletAddress
import uniffi.xmtpv3.GenericException
import java.io.File
import java.security.SecureRandom
import java.util.Date
import java.util.concurrent.CompletableFuture
Expand Down Expand Up @@ -315,19 +316,16 @@ class ClientTest {
dbEncryptionKey = key
)
)
alixClient.dropLocalDatabaseConnection()
alixClient.deleteLocalDatabase()

val alixClient2 = Client().create(
account = alixWallet,
options = ClientOptions(
ClientOptions.Api(XMTPEnvironment.LOCAL, false),
appContext = context,
dbEncryptionKey = key
dbEncryptionKey = key,
dbDirectory = context.filesDir.absolutePath.toString()
)
)
alixClient2.dropLocalDatabaseConnection()
alixClient2.deleteLocalDatabase()
}

val alixClient3 = runBlocking {
Expand All @@ -336,7 +334,8 @@ class ClientTest {
options = ClientOptions(
ClientOptions.Api(XMTPEnvironment.LOCAL, false),
appContext = context,
dbEncryptionKey = key
dbEncryptionKey = key,
dbDirectory = File(context.filesDir.absolutePath, "xmtp_db3").toPath().toString()
)
)
}
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/java/org/xmtp/android/library/Client.kt
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class Client() {
inboxId = inboxId,
nonce = 0.toULong(),
legacySignedPrivateKeyProto = null,
historySyncUrl = null
historySyncUrl = options.historySyncUrl
)

options.preAuthenticateToInboxCallback?.let {
Expand Down

0 comments on commit fbfa0ca

Please sign in to comment.