Skip to content

Commit 3444b07

Browse files
authored
Merge pull request #569 from synonymdev/fix/lnurl-withdraw-pasting
fix: lnurl navigating to the next step before ui update
2 parents fa7e9f4 + 9cb0a11 commit 3444b07

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ class AppViewModel @Inject constructor(
908908
}
909909
}
910910

911-
private fun onScanLnurlWithdraw(data: LnurlWithdrawData) {
911+
private suspend fun onScanLnurlWithdraw(data: LnurlWithdrawData) {
912912
Logger.debug("LNURL: $data", context = TAG)
913913

914914
val minWithdrawable = data.minWithdrawableSat()
@@ -932,7 +932,12 @@ class AppViewModel @Inject constructor(
932932
}
933933

934934
if (minWithdrawable == maxWithdrawable) {
935-
setSendEffect(SendEffect.NavigateToWithdrawConfirm)
935+
delay(TRANSITION_SCREEN_MS)
936+
if (isMainScanner) {
937+
showSheet(Sheet.Send(SendRoute.WithdrawConfirm))
938+
} else {
939+
setSendEffect(SendEffect.NavigateToWithdrawConfirm)
940+
}
936941
return
937942
}
938943

@@ -1627,6 +1632,7 @@ class AppViewModel @Inject constructor(
16271632
_currentSheet.update { null }
16281633
}
16291634
}
1635+
16301636
else -> _currentSheet.update { null }
16311637
}
16321638
}

0 commit comments

Comments
 (0)