Skip to content

Commit 042d3b0

Browse files
ovitrifclaudehappy-otter
committed
refactor: clear restore state on destroy
Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
1 parent e551299 commit 042d3b0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/src/main/java/to/bitkit/viewmodels/RestoreWalletViewModel.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ class RestoreWalletViewModel @Inject constructor(
2626
recomputeValidationState()
2727
}
2828

29+
override fun onCleared() {
30+
_uiState.update {
31+
it.copy(
32+
words = List(WORDS_MAX) { "" },
33+
bip39Passphrase = "",
34+
)
35+
}
36+
}
37+
2938
private fun recomputeValidationState() = viewModelScope.launch {
3039
val currentState = _uiState.value
3140
val checksumError = currentState.isChecksumErrorVisible()

0 commit comments

Comments
 (0)