Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions Bitkit/ViewModels/WalletViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,20 +141,20 @@ class WalletViewModel: ObservableObject {
}

// If no local migration data, try fetching from RN remote backup (one-time)
if channelMigration == nil {
let (remoteMigration, allRetrieved) = await fetchOrphanedChannelMonitorsIfNeeded(walletIndex: walletIndex)
if let remoteMigration {
channelMigration = ChannelDataMigration(
// don't overwrite channel manager, we only need the monitors for the sweep
channelManager: nil,
channelMonitors: remoteMigration.channelMonitors.map { [UInt8]($0) }
)
MigrationsService.shared.pendingChannelMigration = nil
}
if allRetrieved {
MigrationsService.shared.isChannelRecoveryChecked = true
}
}
// if channelMigration == nil {
// let (remoteMigration, allRetrieved) = await fetchOrphanedChannelMonitorsIfNeeded(walletIndex: walletIndex)
// if let remoteMigration {
// channelMigration = ChannelDataMigration(
// // don't overwrite channel manager, we only need the monitors for the sweep
// channelManager: nil,
// channelMonitors: remoteMigration.channelMonitors.map { [UInt8]($0) }
// )
// MigrationsService.shared.pendingChannelMigration = nil
// }
// if allRetrieved {
// MigrationsService.shared.isChannelRecoveryChecked = true
// }
// }

await runLegacyNetworkGraphCleanupIfNeeded()

Expand Down
Loading