Skip to content

Commit

Permalink
problem: incorrect import paths (#1357)
Browse files Browse the repository at this point in the history
  • Loading branch information
BOOMER74 authored Dec 21, 2023
1 parent 66e67e4 commit 7315a1a
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 155 deletions.
1 change: 1 addition & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export {
isEthereum,
isStructuredMessage,
isToken,
isWrappedToken,
ledgerByBlockchain,
tokenAbi,
wrapTokenAbi,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-app/src/common/ToField/ToField.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BlockchainCode } from '@emeraldwallet/core';
import * as addressBook from '@emeraldwallet/store/lib/address-book';
import { addressBook } from '@emeraldwallet/store';
import { Theme } from '@emeraldwallet/ui';
import { ThemeProvider } from '@material-ui/core';
import { mount, shallow } from 'enzyme';
Expand Down
134 changes: 0 additions & 134 deletions packages/react-app/src/create-account/SelectType.tsx

This file was deleted.

8 changes: 4 additions & 4 deletions packages/react-app/src/message/SignMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { EntryId, SeedDescription, SignedMessage, WalletEntry, isEthereumEntry }
import { isSeedPkRef } from '@emeraldpay/emerald-vault-core/lib/types';
import { EthereumMessage, blockchainById, isStructuredMessage } from '@emeraldwallet/core';
import { IState, accounts, screen } from '@emeraldwallet/store';
import { findWallet } from '@emeraldwallet/store/lib/accounts/selectors';
import {
Address,
Back,
Expand Down Expand Up @@ -458,9 +457,10 @@ const SignMessage: React.FC<OwnProps & StateProps & DispatchPros> = ({

export default connect<StateProps, DispatchPros, OwnProps, IState>(
(state, ownProps) => {
const entries = findWallet(state, ownProps.walletId)?.entries.filter(
(entry) => !entry.receiveDisabled && isEthereumEntry(entry),
);
const entries = accounts.selectors
.findWallet(state, ownProps.walletId)
?.entries.filter((entry) => !entry.receiveDisabled && isEthereumEntry(entry));

const entryById = entries?.reduce<EntryById>((carry, entry) => ({ ...carry, [entry.id]: entry }), {});

return {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import { EthereumEntry, WalletEntry } from '@emeraldpay/emerald-vault-core';
import { workflow } from '@emeraldwallet/core';
import { AnyCreateTx } from '@emeraldwallet/core/src/transaction/workflow';
import { CreateTxStage } from '@emeraldwallet/store';
import * as React from 'react';
import { Actions, EthereumFee } from '../components';
import { BaseFlow, Data, DataProvider, Handler } from '../types';

export abstract class CommonFlow implements BaseFlow {
readonly data: Data<AnyCreateTx, WalletEntry>;
readonly data: Data<workflow.AnyCreateTx, WalletEntry>;
readonly dataProvider: DataProvider;
readonly handler: Handler;

constructor(data: Data<AnyCreateTx, WalletEntry>, dataProvider: DataProvider, handler: Handler) {
constructor(data: Data<workflow.AnyCreateTx, WalletEntry>, dataProvider: DataProvider, handler: Handler) {
this.data = data;
this.dataProvider = dataProvider;
this.handler = handler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
TokenAmount,
blockchainIdToCode,
formatAmount,
isWrappedToken,
} from '@emeraldwallet/core';
import { isWrappedToken } from '@emeraldwallet/core/lib/blockchains';
import { ConvertedBalance, IState, TxAction, accounts, screen, tokens } from '@emeraldwallet/store';
import { BlockchainAvatar } from '@emeraldwallet/ui';
import { Button, IconButton, Tooltip, Typography, createStyles, makeStyles } from '@material-ui/core';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { dialog, getCurrentWindow } from '@electron/remote';
import { Wallet } from '@emeraldpay/emerald-vault-core';
import { IState, accounts, application, screen } from '@emeraldwallet/store';
import { ButtonGroup, HashIcon, Input } from '@emeraldwallet/ui';
import Button from '@emeraldwallet/ui/lib/components/common/Button';
import { Button, ButtonGroup, HashIcon, Input } from '@emeraldwallet/ui';
import {
Box,
Dialog,
Expand Down
3 changes: 1 addition & 2 deletions packages/react-app/stories/storeProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { WalletApi } from '@emeraldwallet/core';
import { createStore } from '@emeraldwallet/store';
import { Dispatched } from '@emeraldwallet/store/lib/types';
import { Dispatched, createStore } from '@emeraldwallet/store';
import { DecoratorFunction } from '@storybook/addons/dist/ts3.9/types';
import * as React from 'react';
import { ReactElement } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion packages/store/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export {
export { ConvertedBalance } from './accounts/types';
export { CreateTxStage, FeeState, TxAction } from './txstash/types';
export { DefaultFee } from './application/types';
export { IState } from './types';
export { Dispatched, IState } from './types';
export { RemoteAddressBook } from './remote-access/AddressBook';
export { RemoteAllowances } from './remote-access/Allowances';
export { RemoteBalances } from './remote-access/Balances';
Expand Down
5 changes: 2 additions & 3 deletions packages/store/src/remote-access/Allowances.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { Uuid } from '@emeraldpay/emerald-vault-core';
import { BlockchainCode, IpcCommands, PersistentState } from '@emeraldwallet/core';
import { CachedAllowance, PageResult } from '@emeraldwallet/core/lib/persistentState';
import { ipcRenderer } from 'electron';

class Allowances implements PersistentState.Allowances {
add(walletId: Uuid, allowance: CachedAllowance, ttl?: number): Promise<void> {
add(walletId: Uuid, allowance: PersistentState.CachedAllowance, ttl?: number): Promise<void> {
return ipcRenderer.invoke(IpcCommands.ALLOWANCES_ADD, walletId, allowance, ttl);
}

list(walletId?: Uuid): Promise<PageResult<CachedAllowance>> {
list(walletId?: Uuid): Promise<PersistentState.PageResult<PersistentState.CachedAllowance>> {
return ipcRenderer.invoke(IpcCommands.ALLOWANCES_LIST, walletId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
blockchainIdToCode,
workflow,
} from '@emeraldwallet/core';
import { TxTarget } from '@emeraldwallet/core/src/transaction/workflow';
import { TokenBalanceBelong, accounts, tokens } from '../../../..';
import { getTokens } from '../../../../application/selectors';
import { setAsset, setPreparing, setTransaction } from '../../../actions';
Expand Down Expand Up @@ -148,7 +147,7 @@ export const prepareEthereumRecoveryTx: EntryHandler<EthereumEntry> = (data, sto
);

createTx.from = address;
createTx.target = TxTarget.SEND_ALL;
createTx.target = workflow.TxTarget.SEND_ALL;
createTx.to = recoveryEntry?.address?.value;

createTx.rebalance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
toBigNumber,
workflow,
} from '@emeraldwallet/core';
import { EthereumFeeRange } from '@emeraldwallet/core/src/transaction/workflow';
import { getTokens } from '../../../../application/selectors';
import { setPreparing, setTransaction, setTransactionFee } from '../../../actions';
import { getFee } from '../../../selectors';
Expand Down Expand Up @@ -137,7 +136,7 @@ const recalculateFee: EthereumHandler =

dispatch(setTransaction(createTx.dump()));

const feeRange: EthereumFeeRange<string> = {
const feeRange: workflow.EthereumFeeRange<string> = {
lowMaxGasPrice,
highMaxGasPrice,
lowPriorityGasPrice,
Expand Down

0 comments on commit 7315a1a

Please sign in to comment.