diff --git a/packages/connect/src/device/Device.ts b/packages/connect/src/device/Device.ts index b1b1a48e8e9e..68677a4bc05d 100644 --- a/packages/connect/src/device/Device.ts +++ b/packages/connect/src/device/Device.ts @@ -532,6 +532,11 @@ export class Device extends TypedEmitter { await this.acquire(); } + const getFeaturesTimeout = + DataManager.getSettings('env') === 'react-native' + ? GET_FEATURES_TIMEOUT_REACT_NATIVE + : GET_FEATURES_TIMEOUT; + const { staticSessionId, deriveCardano } = this.getState() || {}; if (acquireNeeded || !staticSessionId || (!deriveCardano && options.useCardanoDerivation)) { // update features @@ -539,10 +544,9 @@ export class Device extends TypedEmitter { if (fn) { await this.initialize(!!options.useCardanoDerivation); } else { - const getFeaturesTimeout = - DataManager.getSettings('env') === 'react-native' - ? GET_FEATURES_TIMEOUT_REACT_NATIVE - : GET_FEATURES_TIMEOUT; + _log.debug('sending cancel'); + await cancelPrompt(this, true).catch(() => {}); + _log.debug('sending cancel done'); let getFeaturesTimeoutId: ReturnType | undefined;