[#1292] Optional chainTip for account creation

- Prepare of the synchronizer should be possible even if the server is down, fetching chain tip was forced and newly is optional

[#1292] Optional chainTip for account creation

- changelog updated
This commit is contained in:
Lukas Korba 2024-06-05 11:45:18 +02:00
parent 4fde1ad672
commit d8023d0bc1
2 changed files with 5 additions and 2 deletions

View File

@ -6,6 +6,9 @@ and this library adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
# Unreleased
## Fixed
- Synchronizer's' `prepare()` method passes even if server is down and not providing chan tip.
# 2.1.8 - 2024-05-30
## Added

View File

@ -415,8 +415,8 @@ public class Initializer {
if let seed, try await rustBackend.listAccounts().isEmpty {
var chainTip: UInt32?
if walletMode == .restoreWallet {
chainTip = UInt32(try await lightWalletService.latestBlockHeight())
if walletMode == .restoreWallet, let latestBlockHeight = try? await lightWalletService.latestBlockHeight() {
chainTip = UInt32(latestBlockHeight)
}
_ = try await rustBackend.createAccount(