Skip to content

Commit

Permalink
fix: lisk-client issue #4520
Browse files Browse the repository at this point in the history
  • Loading branch information
soroushm committed Oct 24, 2022
1 parent e919d09 commit b907e98
Show file tree
Hide file tree
Showing 25 changed files with 112 additions and 102 deletions.
2 changes: 1 addition & 1 deletion app/src/utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ipcMain } from 'electron'; // eslint-disable-line import/no-extraneous-dependencies
import { cryptography } from '@liskhq/lisk-client'; // eslint-disable-line
import { cryptography } from '@liskhq/lisk-client/browser'; // eslint-disable-line

export const createCommand = (command, fn) => {
ipcMain.on(`${command}.request`, (event, ...args) => {
Expand Down
2 changes: 1 addition & 1 deletion libs/hwManager/manufacturers/ledger/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from './constants';
import * as ledger from './index';

jest.mock('@liskhq/lisk-client');
jest.mock('@liskhq/lisk-client/browser');
jest.mock('@hirishh/lisk-ledger.js', () => ({
LedgerAccount: () => ({
derivePath: () => Buffer.from(''),
Expand Down
2 changes: 1 addition & 1 deletion setup/react/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import { I18nextProvider } from 'react-i18next';
import { externalLinks } from 'src/utils/externalLinks';
import { cryptography } from '@liskhq/lisk-client';
import { cryptography } from '@liskhq/lisk-client/browser';
import { store, persistedStore } from 'src/redux/store';
import ipcLocale from 'src/utils/ipcLocale';
import updateApp from '@update/utils/updateApp';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cryptography } from '@liskhq/lisk-client';
import { cryptography } from '@liskhq/lisk-client/browser';
import {
createEvent, fireEvent, screen, waitFor,
} from '@testing-library/react';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/account/utils/encryptAccount.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @todo: this should be re-instated when the issue with lisk-client is fixed
/* istanbul ignore file */
import { cryptography } from '@liskhq/lisk-client';
import { cryptography } from '@liskhq/lisk-client/browser';
import { extractKeyPair, extractAddressFromPublicKey } from 'src/modules/wallet/utils/account';
import { defaultDerivationPath } from 'src/utils/explicitBipKeyDerivation';

Expand Down
2 changes: 1 addition & 1 deletion src/modules/account/utils/encryptAccount.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cryptography, passphrase } from '@liskhq/lisk-client';
import { cryptography, passphrase } from '@liskhq/lisk-client/browser';
import { encryptAccount, decryptAccount } from './encryptAccount';

const recoveryPhrase = 'target cancel solution recipe vague faint bomb convince pink vendor fresh patrol';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cryptography } from '@liskhq/lisk-client';
import { cryptography } from '@liskhq/lisk-client/browser';
import {
fireEvent, screen, waitFor,
} from '@testing-library/react';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
// import Lisk from '@liskhq/lisk-client';
// import Lisk from '@liskhq/lisk-client/browser';
import { mount } from 'enzyme';
import Network from './networkName';

Expand Down
2 changes: 1 addition & 1 deletion src/modules/message/components/signatureCollector/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import { cryptography } from '@liskhq/lisk-client'; // eslint-disable-line
import { cryptography } from '@liskhq/lisk-client/browser'; // eslint-disable-line

import loginTypes from '@auth/const/loginTypes';
import { getDeviceType } from '@wallet/utils/hwManager';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { cryptography } from '@liskhq/lisk-client';
import { cryptography } from '@liskhq/lisk-client/browser';
import { mount } from 'enzyme';
import loginTypes from '@auth/const/loginTypes';
import * as hwManager from '@wallet/utils/hwManager';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/message/utils/verifyMessageValidator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cryptography } from '@liskhq/lisk-client';
import { cryptography } from '@liskhq/lisk-client/browser';

const verifyMessageValidator = (inputs) => {
let isCorrect = false;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/transaction/api/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable max-lines */
import { transactions } from '@liskhq/lisk-client';
import { transactions } from '@liskhq/lisk-client/browser';
import {
MIN_FEE_PER_BYTE,
DEFAULT_NUMBER_OF_SIGNATURES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { cryptography } from '@liskhq/lisk-client';
import { cryptography } from '@liskhq/lisk-client/browser';
import { mount } from 'enzyme';
import { MODULE_COMMANDS_NAME_MAP } from 'src/modules/transaction/configuration/moduleCommand';
import mockBlockchainApplications from '@tests/fixtures/blockchainApplicationsManage';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/transaction/store/actions.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cryptography } from '@liskhq/lisk-client';
import { cryptography } from '@liskhq/lisk-client/browser';
import httpApi from 'src/utils/api/http';
import * as transactionUtils from '@transaction/utils/transaction';
import { getState } from '@tests/fixtures/transactions';
Expand Down
Loading

0 comments on commit b907e98

Please sign in to comment.