Stop printing to console when confirming

This commit is contained in:
Sudarsan Balaji 2021-10-17 02:45:38 +05:30
parent 25977408df
commit 87437fbddc

View File

@ -6,9 +6,14 @@ class LogProgress: BdkProgress {
} }
} }
class NullProgress: BdkProgress {
override fun update(progress: Float, message: String? ) {
}
}
fun getConfirmedTransaction(wallet: OnlineWalletInterface, transactionId: String): ConfirmedTransaction? { fun getConfirmedTransaction(wallet: OnlineWalletInterface, transactionId: String): ConfirmedTransaction? {
println("Syncing...") wallet.sync(NullProgress(), null)
wallet.sync(LogProgress(), null)
return wallet.getTransactions().stream().filter({ it.id.equals(transactionId) }).findFirst().orElse(null) return wallet.getTransactions().stream().filter({ it.id.equals(transactionId) }).findFirst().orElse(null)
} }