Skip to content

Commit

Permalink
fix: try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
jvsena42 committed Oct 28, 2024
1 parent 3933e6a commit 2caebd1
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,18 @@ class WalletManager(
fullScan()
} else {
Log.d(TAG, "sync: normal sync")
val syncRequest = wallet.startSyncWithRevealedSpks().build()
val update = blockchainClient.sync(
syncRequest = syncRequest,
batchSize = 100u,
fetchPrevTxouts = true
)
wallet.applyUpdate(update)
wallet.persist(dbConnection)
try {
val syncRequest = wallet.startSyncWithRevealedSpks().build()
val update = blockchainClient.sync(
syncRequest = syncRequest,
batchSize = 100u,
fetchPrevTxouts = true
)
wallet.applyUpdate(update)
wallet.persist(dbConnection)
} catch (e: Exception) {
Log.e(TAG, "sync error: ", e)
}
}
}

Expand Down

0 comments on commit 2caebd1

Please sign in to comment.