You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
605 B
23 lines
605 B
// @flow
|
|
|
|
import { fromPromise } from 'rxjs/observable/fromPromise'
|
|
|
|
import { createCommand, Command } from 'helpers/ipc'
|
|
import withLibcore from 'helpers/withLibcore'
|
|
|
|
type Input = void
|
|
|
|
type Result = { stringVersion: string, intVersion: number }
|
|
|
|
const cmd: Command<Input, Result> = createCommand('libcoreGetVersion', () =>
|
|
fromPromise(
|
|
withLibcore(async ledgerCore => {
|
|
const core = new ledgerCore.NJSLedgerCore()
|
|
const stringVersion = core.getStringVersion()
|
|
const intVersion = core.getIntVersion()
|
|
return { stringVersion, intVersion }
|
|
}),
|
|
),
|
|
)
|
|
|
|
export default cmd
|
|
|