mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-24 21:39:24 +00:00
chore(@dekstop/keycard): os sleep used in the past is not needed any more
This commit is contained in:
parent
608bb38874
commit
e7c4cd7c6c
@ -1,4 +1,4 @@
|
||||
import stint, std/strutils, uuids, os
|
||||
import stint, std/strutils, uuids
|
||||
import ./io_interface
|
||||
|
||||
import app/core/signals/types
|
||||
@ -457,9 +457,6 @@ proc connectKeycardReponseSignal(self: Controller) =
|
||||
|
||||
proc cancelCurrentFlow*(self: Controller) =
|
||||
self.keycardService.cancelCurrentFlow()
|
||||
# in most cases we're running another flow after canceling the current one,
|
||||
# this way we're giving to the keycard some time to cancel the current flow
|
||||
sleep(200)
|
||||
|
||||
proc runSignFlow(self: Controller, pin, path, dataToSign: string) =
|
||||
self.cancelCurrentFlow()
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Tables, os, uuids, chronicles, json
|
||||
import Tables, uuids, chronicles, json
|
||||
import io_interface
|
||||
|
||||
import app/global/global_singleton
|
||||
@ -196,9 +196,6 @@ proc connectKeycardReponseSignal(self: Controller) =
|
||||
|
||||
proc cancelCurrentFlow*(self: Controller) =
|
||||
self.keycardService.cancelCurrentFlow()
|
||||
# in most cases we're running another flow after canceling the current one,
|
||||
# this way we're giving to the keycard some time to cancel the current flow
|
||||
sleep(200)
|
||||
|
||||
proc runSignFlow*(self: Controller, pin, bip44Path, txHash: string) =
|
||||
self.cancelCurrentFlow()
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Tables, os, uuids, stint, json
|
||||
import Tables, uuids, stint, json
|
||||
|
||||
import ./io_interface
|
||||
|
||||
@ -212,9 +212,6 @@ proc connectKeycardReponseSignal(self: Controller) =
|
||||
|
||||
proc cancelCurrentFlow*(self: Controller) =
|
||||
self.keycardService.cancelCurrentFlow()
|
||||
# in most cases we're running another flow after canceling the current one,
|
||||
# this way we're giving to the keycard some time to cancel the current flow
|
||||
sleep(200)
|
||||
|
||||
proc runSignFlow*(self: Controller, pin, bip44Path, txHash: string) =
|
||||
self.cancelCurrentFlow()
|
||||
|
@ -1,5 +1,5 @@
|
||||
import sugar, sequtils, stint, json, json_serialization
|
||||
import uuids, os, chronicles
|
||||
import uuids, chronicles
|
||||
import io_interface
|
||||
import app_service/service/wallet_account/service as wallet_account_service
|
||||
import app_service/service/network/service as network_service
|
||||
@ -151,9 +151,6 @@ proc connectKeycardReponseSignal(self: Controller) =
|
||||
|
||||
proc cancelCurrentFlow*(self: Controller) =
|
||||
self.keycardService.cancelCurrentFlow()
|
||||
# in most cases we're running another flow after canceling the current one,
|
||||
# this way we're giving to the keycard some time to cancel the current flow
|
||||
sleep(200)
|
||||
|
||||
proc runSignFlow*(self: Controller, pin, bip44Path, txHash: string) =
|
||||
self.cancelCurrentFlow()
|
||||
|
@ -1,4 +1,4 @@
|
||||
import times, os, chronicles
|
||||
import times, chronicles
|
||||
import uuids
|
||||
import io_interface
|
||||
|
||||
@ -224,9 +224,6 @@ proc connectKeycardReponseSignal(self: Controller) =
|
||||
|
||||
proc cancelCurrentFlow*(self: Controller) =
|
||||
self.keycardService.cancelCurrentFlow()
|
||||
# in most cases we're running another flow after canceling the current one,
|
||||
# this way we're giving to the keycard some time to cancel the current flow
|
||||
sleep(200)
|
||||
|
||||
proc fetchAddressesFromKeycard*(self: Controller, bip44Paths: seq[string]) =
|
||||
self.cancelCurrentFlow()
|
||||
|
@ -1,4 +1,4 @@
|
||||
import chronicles, tables, strutils, os, sequtils, sugar
|
||||
import chronicles, tables, strutils, sequtils, sugar
|
||||
import uuids
|
||||
import io_interface
|
||||
|
||||
@ -491,9 +491,6 @@ proc cancelCurrentFlow*(self: Controller) =
|
||||
if not serviceApplicable(self.keycardService):
|
||||
return
|
||||
self.keycardService.cancelCurrentFlow()
|
||||
# in most cases we're running another flow after canceling the current one,
|
||||
# this way we're giving to the keycard some time to cancel the current flow
|
||||
sleep(200)
|
||||
|
||||
proc runGetAppInfoFlow*(self: Controller, factoryReset = false) =
|
||||
if not serviceApplicable(self.keycardService):
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Tables, chronicles, strutils, os
|
||||
import Tables, chronicles, strutils
|
||||
import uuids
|
||||
import io_interface
|
||||
|
||||
@ -534,9 +534,6 @@ proc getLastReceivedKeycardData*(self: Controller): tuple[flowType: string, flow
|
||||
|
||||
proc cancelCurrentFlow*(self: Controller) =
|
||||
self.keycardService.cancelCurrentFlow()
|
||||
# in most cases we're running another flow after canceling the current one,
|
||||
# this way we're giving to the keycard some time to cancel the current flow
|
||||
sleep(200)
|
||||
|
||||
proc runLoadAccountFlow*(self: Controller, seedPhraseLength = 0, seedPhrase = "", pin = "", puk = "", factoryReset = false) =
|
||||
self.cancelCurrentFlow() # before running into any flow we're making sure that the previous flow is canceled
|
||||
|
Loading…
x
Reference in New Issue
Block a user