@ -21,8 +21,17 @@ const cmd: Command<Input, Result> = 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
@ -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<AccountRaw[]> {