diff --git a/src/commands/libcoreScanAccounts.js b/src/commands/libcoreScanAccounts.js index 278a4664..0cb7fb6c 100644 --- a/src/commands/libcoreScanAccounts.js +++ b/src/commands/libcoreScanAccounts.js @@ -21,8 +21,17 @@ const cmd: Command = createCommand( scanAccountsOnDevice({ devicePath, currencyId, - onAccountScanned: account => o.next(account), - }).then(() => o.complete(), e => o.error(e)) + onAccountScanned: account => { + o.next(account) + }, + }).then( + () => { + o.complete() + }, + e => { + o.error(e) + }, + ) function unsubscribe() { // FIXME not implemented diff --git a/src/helpers/libcore.js b/src/helpers/libcore.js index bda260ac..1db3b08f 100644 --- a/src/helpers/libcore.js +++ b/src/helpers/libcore.js @@ -18,7 +18,7 @@ import type { NJSAccount, NJSOperation } from '@ledgerhq/ledger-core/src/ledgerc type Props = { devicePath: string, currencyId: string, - onAccountScanned: AccountRaw => *, + onAccountScanned: AccountRaw => void, } export function scanAccountsOnDevice(props: Props): Promise {