on master help sign in
refactor: move history to /store
commit4a17a28b5b9b67674d94c72070b00da3affcf3d0 authorMatt Condon (shrugs) <mattgcondon@gmail.com> dateTue 11 Jun 2019, 11:14 (7 years ago) parente2171df
20 files changed+21−21
src/bridge/Bridge.js+1−1 src/bridge/components/Header.js+1−1 src/bridge/components/StatelessTransaction.js+1−1 src/bridge/lib/history.js → src/bridge/store/history.js+2−2 src/bridge/views/InviteTicket.js+1−1 src/bridge/views/Keystore.js+1−1 src/bridge/views/Landing.js+1−1 src/bridge/views/Ledger.js+1−1 src/bridge/views/Mnemonic.js+1−1 src/bridge/views/Network.js+1−1 src/bridge/views/Point.js+1−1 src/bridge/views/Point/Actions.js+1−1 src/bridge/views/Points.js+1−1 src/bridge/views/PrivateKey.js+1−1 src/bridge/views/SentTransaction.js+1−1 src/bridge/views/Shards.js+1−1 src/bridge/views/Ticket.js+1−1 src/bridge/views/Trezor.js+1−1 src/bridge/views/ViewPoint.js+1−1 src/bridge/views/Wallet.js+1−1
src/bridge/Bridge.js+1−1
@@ -9,7 +9,7 @@ import { Container, Row, Col } from "./components/Base";
99import { router } from "./lib/router";
1010import { initWeb3 } from "./lib/web3";
1111import { ROUTE_NAMES } from "./lib/routeNames";
12−import { HistoryProvider, withHistory, useHistory } from "./lib/history";
12+import { HistoryProvider, withHistory, useHistory } from "./store/history";
1313import { TxnConfirmationsProvider } from "./store/txnConfirmations";
1414import { NETWORK_NAMES } from "./lib/network";
1515import {
src/bridge/components/Header.js+1−1
@@ -3,7 +3,7 @@ import { Button, Chevron } from "../components/Base";
33
44import { getRouteBreadcrumb } from "../lib/router";
55import { ROUTE_NAMES } from "../lib/routeNames";
6−import { useHistory } from "../lib/history";
6+import { useHistory } from "../store/history";
77import { isLast } from "../lib/lib";
88
99function Crumbs(props) {
src/bridge/components/StatelessTransaction.js+1−1
@@ -10,7 +10,7 @@ import { Warning } from "../components/Base";
1010
1111import { BRIDGE_ERROR } from "../lib/error";
1212import { ROUTE_NAMES } from "../lib/routeNames";
13−import { withHistory } from "../lib/history";
13+import { withHistory } from "../store/history";
1414import * as tank from "../lib/tank";
1515
1616import {
src/bridge/lib/history.js → src/bridge/store/history.jsrenamed+2−2
@@ -1,8 +1,8 @@
11import React, { useContext, useState, useEffect } from "react";
22import { last, includes } from "lodash";
33
4−import { BRIDGE_ERROR } from "./error";
5−import { ROUTE_NAMES } from "./routeNames";
4+import { BRIDGE_ERROR } from "../lib/error";
5+import { ROUTE_NAMES } from "../lib/routeNames";
66
77export const HistoryContext = React.createContext(null);
88
src/bridge/views/InviteTicket.js+1−1
@@ -15,7 +15,7 @@ import * as need from "../lib/need";
1515
1616import { randomPatq } from "../lib/lib";
1717import { ROUTE_NAMES } from "../lib/routeNames";
18−import { withHistory } from "../lib/history";
18+import { withHistory } from "../store/history";
1919import {
2020 DEFAULT_HD_PATH,
2121 ownershipWalletFromTicket,
src/bridge/views/Keystore.js+1−1
@@ -8,7 +8,7 @@ import { Row, Col, H1, H3, Warning } from "../components/Base";
88
99import { BRIDGE_ERROR } from "../lib/error";
1010import { ROUTE_NAMES } from "../lib/routeNames";
11−import { withHistory } from "../lib/history";
11+import { withHistory } from "../store/history";
1212import { EthereumWallet } from "../lib/wallet";
1313
1414class Keystore extends React.Component {
src/bridge/views/Landing.js+1−1
@@ -4,7 +4,7 @@ import { Row, Col } from "../components/Base";
44import { H1, P } from "../components/Base";
55
66import { ROUTE_NAMES } from "../lib/routeNames";
7−import { useHistory } from "../lib/history";
7+import { useHistory } from "../store/history";
88
99function Landing(props) {
1010 const history = useHistory();
src/bridge/views/Ledger.js+1−1
@@ -10,7 +10,7 @@ import * as secp256k1 from "secp256k1";
1010
1111import { LEDGER_LIVE_PATH, LEDGER_LEGACY_PATH } from "../lib/ledger";
1212import { ROUTE_NAMES } from "../lib/routeNames";
13−import { withHistory } from "../lib/history";
13+import { withHistory } from "../store/history";
1414
1515const chopHdPrefix = str => (str.slice(0, 2) === "m/" ? str.slice(2) : str);
1616
src/bridge/views/Mnemonic.js+1−1
@@ -11,7 +11,7 @@ import {
1111import { Row, Col, H1 } from "../components/Base";
1212
1313import { ROUTE_NAMES } from "../lib/routeNames";
14−import { withHistory } from "../lib/history";
14+import { withHistory } from "../store/history";
1515import { DEFAULT_HD_PATH, walletFromMnemonic } from "../lib/wallet";
1616
1717class Mnemonic extends React.Component {
src/bridge/views/Network.js+1−1
@@ -9,7 +9,7 @@ import Web3 from "web3";
99import { CONTRACT_ADDRESSES } from "../lib/contracts";
1010import { NETWORK_NAMES, renderNetworkType } from "../lib/network";
1111import { ROUTE_NAMES } from "../lib/routeNames";
12−import { withHistory } from "../lib/history";
12+import { withHistory } from "../store/history";
1313
1414class Network extends React.Component {
1515 constructor(props) {
src/bridge/views/Point.js+1−1
@@ -10,7 +10,7 @@ import ReactSVGComponents from "../components/ReactSVGComponents";
1010import KeysAndMetadata from "./Point/KeysAndMetadata";
1111import Actions from "./Point/Actions";
1212import { Row, Col, H1, H3 } from "../components/Base";
13−import { withHistory } from "../lib/history";
13+import { withHistory } from "../store/history";
1414
1515class Point extends React.Component {
1616 constructor(props) {
src/bridge/views/Point/Actions.js+1−1
@@ -6,7 +6,7 @@ import { ETH_ZERO_ADDR, CURVE_ZERO_ADDR, eqAddr } from "../../lib/wallet";
66import { Row, Col, H2, P } from "../../components/Base";
77import { Button } from "../../components/Base";
88import { ROUTE_NAMES } from "../../lib/routeNames";
9−import { useHistory } from "../../lib/history";
9+import { useHistory } from "../../store/history";
1010
1111const isPlanet = point =>
1212 azimuth.getPointSize(point) === azimuth.PointSize.Planet;
src/bridge/views/Points.js+1−1
@@ -6,7 +6,7 @@ import * as azimuth from "azimuth-js";
66import PointList from "../components/PointList";
77import { NETWORK_NAMES } from "../lib/network";
88import { ROUTE_NAMES } from "../lib/routeNames";
9−import { withHistory } from "../lib/history";
9+import { withHistory } from "../store/history";
1010import { ETH_ZERO_ADDR, eqAddr } from "../lib/wallet";
1111
1212const hasTransferProxy = (cache, point) =>
src/bridge/views/PrivateKey.js+1−1
@@ -5,7 +5,7 @@ import { RequiredInput, InnerLabel, InputCaption } from "../components/Base";
55import { Row, Col, H1 } from "../components/Base";
66
77import { ROUTE_NAMES } from "../lib/routeNames";
8−import { withHistory } from "../lib/history";
8+import { withHistory } from "../store/history";
99import { EthereumWallet } from "../lib/wallet";
1010
1111class PrivateKey extends React.Component {
src/bridge/views/SentTransaction.js+1−1
@@ -5,7 +5,7 @@ import { Row, Col, H1, H3, P, Warning, Anchor } from "../components/Base";
55import { Button } from "../components/Base";
66
77import { ROUTE_NAMES } from "../lib/routeNames";
8−import { useHistory } from "../lib/history";
8+import { useHistory } from "../store/history";
99import { BRIDGE_ERROR, renderTxnError } from "../lib/error";
1010import { NETWORK_NAMES } from "../lib/network";
1111import { withTxnConfirmations } from "../store/txnConfirmations";
src/bridge/views/Shards.js+1−1
@@ -14,7 +14,7 @@ import * as kg from "urbit-key-generation/dist/index";
1414import * as ob from "urbit-ob";
1515
1616import { ROUTE_NAMES } from "../lib/routeNames";
17−import { withHistory } from "../lib/history";
17+import { withHistory } from "../store/history";
1818import { urbitWalletFromTicket } from "../lib/wallet";
1919
2020const placeholder = len => {
src/bridge/views/Ticket.js+1−1
@@ -13,7 +13,7 @@ import { Row, Col, H1, P } from "../components/Base";
1313
1414import { randomPatq } from "../lib/lib";
1515import { ROUTE_NAMES } from "../lib/routeNames";
16−import { withHistory } from "../lib/history";
16+import { withHistory } from "../store/history";
1717import { urbitWalletFromTicket } from "../lib/wallet";
1818
1919class Ticket extends React.Component {
src/bridge/views/Trezor.js+1−1
@@ -9,7 +9,7 @@ import * as secp256k1 from "secp256k1";
99
1010import { TREZOR_PATH } from "../lib/trezor";
1111import { ROUTE_NAMES } from "../lib/routeNames";
12−import { withHistory } from "../lib/history";
12+import { withHistory } from "../store/history";
1313
1414class Trezor extends React.Component {
1515 constructor(props) {
src/bridge/views/ViewPoint.js+1−1
@@ -7,7 +7,7 @@ import { Row, Col, H1, P } from "../components/Base";
77import { InnerLabel, PointInput, ValidatedSigil } from "../components/Base";
88
99import { ROUTE_NAMES } from "../lib/routeNames";
10−import { withHistory } from "../lib/history";
10+import { withHistory } from "../store/history";
1111
1212class ViewPoint extends React.Component {
1313 constructor(props) {
src/bridge/views/Wallet.js+1−1
@@ -5,7 +5,7 @@ import { InnerLabelDropdown } from "../components/Base";
55import { Row, Col } from "../components/Base";
66
77import { ROUTE_NAMES } from "../lib/routeNames";
8−import { withHistory } from "../lib/history";
8+import { withHistory } from "../store/history";
99import { WALLET_NAMES, renderWalletType } from "../lib/wallet";
1010
1111class Wallet extends React.Component {