Browse Source

fix flow

master
Gaëtan Renaudeau 7 years ago
parent
commit
1e2aa3cf2f
  1. 13
      src/commands/libcoreScanAccounts.js
  2. 2
      src/helpers/libcore.js

13
src/commands/libcoreScanAccounts.js

@ -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

2
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<AccountRaw[]> {

Loading…
Cancel
Save