Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ab59838
fix: stop automatic profile deletion replay
ben-kaufman Oct 24, 2026
99b446a
docs: associate deletion fix with PR 1688
ben-kaufman Oct 24, 2026
a8f0810
fix: preserve pending backups across restart
ben-kaufman Oct 25, 2026
e585fcc
fix: retain backup changes while restart drains
ben-kaufman Oct 25, 2026
c255458
Merge restore recovery parent into backup lifecycle fix
ben-kaufman Oct 26, 2026
a102e0e
fix: recognize native backup request transport failures
ben-kaufman Oct 26, 2026
49e9a99
fix: retain explicit backup retry ownership
ben-kaufman Oct 26, 2026
5fe0bf6
fix: integrate current restore recovery parent
ben-kaufman Oct 28, 2026
5fca5cd
fix: integrate current restore recovery parent
ben-kaufman Oct 28, 2026
e80ca3f
Merge updated restore identity parent into backup lifecycle
ben-kaufman Oct 29, 2026
9a837a6
fix: keep recovery callbacks ahead of backup debounce
ben-kaufman Oct 29, 2026
2aac53e
Merge current identity recovery into profile session recovery
ben-kaufman Oct 29, 2026
1d3ba14
Merge current identity recovery parent into backup observers
ben-kaufman Oct 29, 2026
ff5aa32
Merge restored identity guards into profile deletion recovery
ben-kaufman Oct 30, 2026
9cfe052
Merge restore metadata guards into backup observer lifecycle
ben-kaufman Oct 30, 2026
cfe7daf
Merge validated identity restore parent
ben-kaufman Nov 1, 2026
9226253
Merge restored-identity allowance admission
ben-kaufman Nov 1, 2026
a3693b0
Merge stable allowance activation into backup observation
ben-kaufman Nov 1, 2026
2eb0c49
Merge guarded identity and allowance recovery parent
ben-kaufman Nov 1, 2026
f068aba
Merge current allowance resume fix into recovery branch
ben-kaufman Nov 1, 2026
439b5d0
merge: include identity recovery diagnostics
ben-kaufman Nov 1, 2026
add2c04
merge: integrate current identity recovery
ben-kaufman Nov 3, 2026
8727da0
fix: initialize cold explicit backup retries
ben-kaufman Nov 3, 2026
e7fb0ac
fix: retry backup authentication transport failures
ben-kaufman Nov 3, 2026
1a6048a
fix: retain backup ownership across wallet transitions
ben-kaufman Nov 4, 2026
2fa4098
merge: compose queued backup status
ben-kaufman Nov 4, 2026
1cf5d39
merge: compose admitted backup status
ben-kaufman Nov 4, 2026
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
898 changes: 587 additions & 311 deletions app/src/main/java/to/bitkit/repositories/BackupRepo.kt

Large diffs are not rendered by default.

24 changes: 0 additions & 24 deletions app/src/main/java/to/bitkit/repositories/PubkyRepo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1108,16 +1108,6 @@ class PubkyRepo @Inject constructor(
}
}

suspend fun deleteProfileWithSessionRetry(): Result<Unit> = withContext(ioDispatcher) {
val initialResult = deleteProfile()
if (initialResult.isSuccess) return@withContext initialResult

val refreshedSession = refreshSessionIfPossible().getOrDefault(false)
if (!refreshedSession) return@withContext initialResult

deleteProfile()
}

suspend fun deleteProfile(): Result<Unit> = runSuspendCatching {
withContext(ioDispatcher) {
requireNotNull(keychain.loadString(Keychain.Key.PAYKIT_SESSION.name)) {
Expand Down Expand Up @@ -1834,20 +1824,6 @@ class PubkyRepo @Inject constructor(
}
}

suspend fun refreshSessionIfPossible(): Result<Boolean> = runSuspendCatching {
withContext(ioDispatcher) {
val storedSecretKeyHex = activeSecretKeyHex() ?: return@withContext false

pubkyService.signIn(storedSecretKeyHex)
val publicKey = pubkyService.publicKeyFromSecret(storedSecretKeyHex).ensurePubkyPrefix()

notifyBackupStateChanged()
continueSignIn(publicKey)

true
}
}

// endregion

// region Sign out
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class EditProfileViewModel @Inject constructor(
try {
privatePaykitRepo.beginProfileDeletion()
privatePaykitRepo.removePublishedEndpointsForCleanup(TAG, deferAppSync = true)
val result = pubkyRepo.deleteProfileWithSessionRetry()
val result = pubkyRepo.deleteProfile()
if (result.isSuccess) {
privatePaykitRepo.closeAndClear()
ToastEventBus.send(
Expand Down
Loading
Loading