Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
Fix unfortunate problem with near-api-js update
Browse files Browse the repository at this point in the history
For some reason didn't get caught by `np` running tests.
I guess because old version was available locally?
  • Loading branch information
vgrichina committed Apr 15, 2020
1 parent f2a33af commit 86b1b18
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion commands/call.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const nearlib = require('nearlib');
const nearlib = require('near-api-js');
const { utils } = nearlib;
const exitOnError = require('../utils/exit-on-error');
const connect = require('../utils/connect');
Expand Down
2 changes: 1 addition & 1 deletion commands/create-account.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

const exitOnError = require('../utils/exit-on-error');
const connect = require('../utils/connect');
const { KeyPair, utils } = require('nearlib');
const { KeyPair, utils } = require('near-api-js');

module.exports = {
command: 'create_account <accountId>',
Expand Down
2 changes: 1 addition & 1 deletion commands/dev-deploy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { KeyPair } = require('nearlib');
const { KeyPair } = require('near-api-js');
const exitOnError = require('../utils/exit-on-error');
const connect = require('../utils/connect');
const { readFile, writeFile } = require('fs').promises;
Expand Down
2 changes: 1 addition & 1 deletion commands/generate-key.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const KeyPair = require('nearlib').KeyPair;
const KeyPair = require('near-api-js').KeyPair;
const exitOnError = require('../utils/exit-on-error');

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion commands/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
handler: async (argv) => {
const repl = require('repl');
const context = repl.start('> ').context;
context.nearlib = require('nearlib');
context.nearlib = require('near-api-js');
context.near = await require('../utils/connect')(argv);
if (argv.accountId) {
context.account = await context.near.account(argv.accountId);
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const readline = require('readline');
const URL = require('url').URL;
const chalk = require('chalk'); // colorize output
const open = require('open'); // open URL in default browser
const { KeyPair, utils } = require('nearlib');
const { KeyPair, utils } = require('near-api-js');

const connect = require('./utils/connect');
const verify = require('./utils/verify-account');
Expand Down
2 changes: 1 addition & 1 deletion middleware/key-store.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const nearlib = require('nearlib');
const nearlib = require('near-api-js');
const UnencryptedFileSystemKeyStore = nearlib.keyStores.UnencryptedFileSystemKeyStore;

module.exports = async function createKeyStore() {
Expand Down
4 changes: 2 additions & 2 deletions test_environment.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const NodeEnvironment = require('jest-environment-node');
const nearlib = require('nearlib');
const nearlib = require('near-api-js');
const fs = require('fs');

const INITIAL_BALANCE = '100000000000';
Expand All @@ -11,7 +11,7 @@ class LocalTestEnvironment extends NodeEnvironment {
}

async setup() {
this.global.nearlib = require('nearlib');
this.global.nearlib = require('near-api-js');
this.global.window = {};
let config = require('./get-config')();
this.global.testSettings = this.global.nearConfig = config;
Expand Down
2 changes: 1 addition & 1 deletion utils/connect.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const nearlib = require('nearlib');
const nearlib = require('near-api-js');

module.exports = async function connect({ keyStore, ...options }) {
// TODO: Avoid need to wrap in deps
Expand Down
2 changes: 1 addition & 1 deletion utils/verify-account.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const chalk = require('chalk');

// NEAR imports
const { keyStores } = require('nearlib');
const { keyStores } = require('near-api-js');
const UnencryptedFileSystemKeyStore = keyStores.UnencryptedFileSystemKeyStore;

// local imports
Expand Down

0 comments on commit 86b1b18

Please sign in to comment.