Updated on 2026-08-14
This commit is contained in:
parent
74d6573e31
commit
c451b21301
5 changed files with 50 additions and 33 deletions
|
|
@ -32,6 +32,7 @@ internal class DefaultScanCardProcessor : ScanCardProcessor {
|
|||
onProgressStateChange: suspend (showProgress: Boolean) -> Unit,
|
||||
onWalletNotCreated: suspend () -> Unit,
|
||||
disclaimerWillShow: () -> Unit,
|
||||
onCancel: suspend () -> Unit,
|
||||
onFailure: suspend (error: TangemError) -> Unit,
|
||||
onSuccess: suspend (scanResponse: ScanResponse) -> Unit,
|
||||
) {
|
||||
|
|
@ -52,6 +53,7 @@ internal class DefaultScanCardProcessor : ScanCardProcessor {
|
|||
onProgressStateChange,
|
||||
onWalletNotCreated,
|
||||
disclaimerWillShow,
|
||||
onCancel,
|
||||
onFailure,
|
||||
onSuccess,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ internal object LegacyScanProcessor {
|
|||
onProgressStateChange: suspend (showProgress: Boolean) -> Unit,
|
||||
onWalletNotCreated: suspend () -> Unit,
|
||||
disclaimerWillShow: () -> Unit,
|
||||
onCancel: suspend () -> Unit,
|
||||
onFailure: suspend (error: TangemError) -> Unit,
|
||||
onSuccess: suspend (scanResponse: ScanResponse) -> Unit,
|
||||
) = withMainContext {
|
||||
|
|
@ -88,6 +89,7 @@ internal object LegacyScanProcessor {
|
|||
onProgressStateChange = onProgressStateChange,
|
||||
onSuccess = onSuccess,
|
||||
onWalletNotCreated = onWalletNotCreated,
|
||||
onCancel = onCancel,
|
||||
)
|
||||
},
|
||||
)
|
||||
|
|
@ -138,13 +140,19 @@ internal object LegacyScanProcessor {
|
|||
scanResponse: ScanResponse,
|
||||
crossinline onProgressStateChange: suspend (showProgress: Boolean) -> Unit,
|
||||
crossinline onWalletNotCreated: suspend () -> Unit,
|
||||
crossinline onCancel: suspend () -> Unit,
|
||||
crossinline onSuccess: suspend (ScanResponse) -> Unit,
|
||||
) {
|
||||
store.dispatchOnMain(TwinCardsAction.IfTwinsPrepareState(scanResponse))
|
||||
|
||||
checkCardWasUsedInApp(
|
||||
scanResponse = scanResponse,
|
||||
onCancel = { mainScope.launch { onProgressStateChange.invoke(false) } },
|
||||
onCancel = {
|
||||
mainScope.launch {
|
||||
onProgressStateChange.invoke(false)
|
||||
onCancel()
|
||||
}
|
||||
},
|
||||
) {
|
||||
if (OnboardingHelper.isOnboardingCase(scanResponse)) {
|
||||
Analytics.addContext(scanResponse)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue