Skip to content

Commit

Permalink
Shepherd MVP Integration (#1413)
Browse files Browse the repository at this point in the history
* initial mvp

* First functioning pass

* Add token balance shim

* Add working web3 implementation

* Fix tests

* Fix tsc errors

* Implement token batch splitting

* Undo logger change

* Fix linting errors

* Revert makeconfig change

* Add typing to token proxy + use string interpolation

* Remove useless parameter

* Remove logging

* Use type coercion to fix proxied methods

* Update shepherd

* Update to typescript 2.8.1

* Fix merged typings

* Address PR comments

* replace myc-shepherd with mycrypto-shepherd
  • Loading branch information
HenryNguyen5 authored and dternyak committed Apr 6, 2018
1 parent fde8867 commit 04eaa08
Show file tree
Hide file tree
Showing 33 changed files with 626 additions and 538 deletions.
4 changes: 2 additions & 2 deletions common/actions/config/actionTypes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TypeKeys } from './constants';
import { CustomNodeConfig, Web3NodeConfig } from 'types/node';
import { CustomNodeConfig, StaticNodeConfig } from 'types/node';
import { CustomNetworkConfig } from 'types/network';

/*** Toggle Offline ***/
Expand Down Expand Up @@ -80,7 +80,7 @@ export interface Web3UnsetNodeAction {
/*** Set Web3 as a Node ***/
export interface Web3setNodeAction {
type: TypeKeys.CONFIG_NODE_WEB3_SET;
payload: { id: 'web3'; config: Web3NodeConfig };
payload: { id: 'web3'; config: StaticNodeConfig };
}

export type CustomNetworkAction = AddCustomNetworkAction | RemoveCustomNetworkAction;
Expand Down
6 changes: 2 additions & 4 deletions common/components/Header/components/CustomNodeModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import {
getCustomNodeConfigs,
getStaticNetworkConfigs
} from 'selectors/config';
import { CustomNode } from 'libs/nodes';
import { Input, Dropdown } from 'components/ui';
import './CustomNodeModal.scss';
import { shepherdProvider } from 'libs/nodes';

const CUSTOM = { label: 'Custom', value: 'custom' };

Expand Down Expand Up @@ -329,9 +329,7 @@ class CustomNodeModal extends React.Component<Props, State> {
: {})
};

const lib = new CustomNode(node);

return { ...node, lib };
return { ...node, lib: shepherdProvider };
}

private getConflictedNode(): CustomNodeConfig | undefined {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ import { connect } from 'react-redux';
import { Fields } from './components';
import { setDataField, TSetDataField } from 'actions/transaction';
import { Data } from 'libs/units';
import { Web3Node } from 'libs/nodes';
import RpcNode from 'libs/nodes/rpc';
import { Input, Dropdown } from 'components/ui';
import { INode } from 'libs/nodes';

interface StateProps {
nodeLib: RpcNode | Web3Node;
nodeLib: INode;
to: AppState['transaction']['fields']['to'];
dataExists: boolean;
}
Expand Down
18 changes: 0 additions & 18 deletions common/libs/nodes/custom/index.ts

This file was deleted.

29 changes: 0 additions & 29 deletions common/libs/nodes/etherscan/client.ts

This file was deleted.

14 changes: 0 additions & 14 deletions common/libs/nodes/etherscan/index.ts

This file was deleted.

84 changes: 0 additions & 84 deletions common/libs/nodes/etherscan/requests.ts

This file was deleted.

63 changes: 0 additions & 63 deletions common/libs/nodes/etherscan/types.ts

This file was deleted.

Loading

0 comments on commit 04eaa08

Please sign in to comment.