meriadec
7 years ago
No known key found for this signature in database
GPG Key ID: 1D2FC2305E2CB399
1 changed files with
4 additions and
3 deletions
-
src/commands/libcoreGetVersion.js
|
@ -1,16 +1,17 @@ |
|
|
// @flow
|
|
|
// @flow
|
|
|
|
|
|
|
|
|
import { createCommand, Command } from 'helpers/ipc' |
|
|
|
|
|
import { fromPromise } from 'rxjs/observable/fromPromise' |
|
|
import { fromPromise } from 'rxjs/observable/fromPromise' |
|
|
|
|
|
|
|
|
|
|
|
import { createCommand, Command } from 'helpers/ipc' |
|
|
|
|
|
import withLibcore from 'helpers/withLibcore' |
|
|
|
|
|
|
|
|
type Input = void |
|
|
type Input = void |
|
|
|
|
|
|
|
|
type Result = { stringVersion: string, intVersion: number } |
|
|
type Result = { stringVersion: string, intVersion: number } |
|
|
|
|
|
|
|
|
const cmd: Command<Input, Result> = createCommand('libcoreGetVersion', () => |
|
|
const cmd: Command<Input, Result> = createCommand('libcoreGetVersion', () => |
|
|
fromPromise( |
|
|
fromPromise( |
|
|
Promise.resolve().then(() => { |
|
|
withLibcore(ledgerCore => { |
|
|
const ledgerCore = require('init-ledger-core')() |
|
|
|
|
|
const core = new ledgerCore.NJSLedgerCore() |
|
|
const core = new ledgerCore.NJSLedgerCore() |
|
|
const stringVersion = core.getStringVersion() |
|
|
const stringVersion = core.getStringVersion() |
|
|
const intVersion = core.getIntVersion() |
|
|
const intVersion = core.getIntVersion() |
|
|