From e90f9bca1fa5af68774ba093dedcc3f07f42efd8 Mon Sep 17 00:00:00 2001 From: meriadec Date: Wed, 21 Nov 2018 14:07:58 +0100 Subject: [PATCH] Fix cli script --- scripts/cli/cli.sh | 2 +- scripts/cli/txBetweenAccounts.js | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/cli/cli.sh b/scripts/cli/cli.sh index 3484d589..93a96030 100644 --- a/scripts/cli/cli.sh +++ b/scripts/cli/cli.sh @@ -6,4 +6,4 @@ export LEDGER_LOGS_DIRECTORY="$LEDGER_DATA_DIR/logs" export LEDGER_LIVE_SQLITE_PATH="$LEDGER_DATA_DIR/sqlite" export CLI=1 -node -r @babel/register scripts/cli/txBetweenAccounts.js +node -r @babel/register -r @babel/polyfill scripts/cli/txBetweenAccounts.js diff --git a/scripts/cli/txBetweenAccounts.js b/scripts/cli/txBetweenAccounts.js index bc7522ff..e6838653 100644 --- a/scripts/cli/txBetweenAccounts.js +++ b/scripts/cli/txBetweenAccounts.js @@ -4,17 +4,15 @@ import chalk from 'chalk' import path from 'path' import fs from 'fs' import inquirer from 'inquirer' -import { createAccountModel } from '@ledgerhq/live-common/lib/models/account' -import { formatCurrencyUnit } from '@ledgerhq/live-common/lib/helpers/currencies' +import { formatCurrencyUnit } from '@ledgerhq/live-common/lib/currencies' import 'globals' import withLibcore from 'helpers/withLibcore' +import accountModel from 'helpers/accountModel' import { doSignAndBroadcast } from 'commands/libcoreSignAndBroadcast' import getDevice from './getDevice' -const accountModel = createAccountModel() - async function main() { try { // GET ACCOUNTS