Skip to content

Commit

Permalink
(legacy) Relax rule for channel force-close in migration
Browse files Browse the repository at this point in the history
  • Loading branch information
dpad85 committed Nov 25, 2024
1 parent dd2f9d1 commit 7439267
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class MigrationDialogViewModel : ViewModel() {
state.value = MigrationScreenState.Complete(swapInAddress, channelsPublicationStatusMap.keys)

// pause then update preferences to switch to the new app
delay(3_000)
delay(2_000)
LegacyPrefsDatastore.savePrefsMigrationExpected(context, true)
LegacyPrefsDatastore.saveDataMigrationExpected(context, true)
LegacyPrefsDatastore.saveHasMigratedFromLegacy(context, true)
Expand All @@ -304,12 +304,12 @@ class MigrationDialogViewModel : ViewModel() {
return channels.any {
when (val data = it.data()) {
is DATA_CLOSING -> {
data.remoteCommitPublished().isDefined
|| !data.revokedCommitPublished().isEmpty
|| !data.customRemoteCommitPublished().isEmpty
|| data.futureRemoteCommitPublished().isDefined
|| data.localCommitPublished().isDefined
|| data.nextRemoteCommitPublished().isDefined
(data.remoteCommitPublished().nonEmpty() && data.remoteCommitPublished().get().irrevocablySpent().isEmpty) // potentially a remote close but remote commit is not confirmed
|| data.revokedCommitPublished().nonEmpty()
|| data.customRemoteCommitPublished().nonEmpty()
|| data.futureRemoteCommitPublished().nonEmpty()
|| data.localCommitPublished().nonEmpty()
|| data.nextRemoteCommitPublished().nonEmpty()
}
else -> false
}
Expand Down

0 comments on commit 7439267

Please sign in to comment.