on master help sign in
fix: convert more instances of wallet usage to new store
commit1faa15cf5059cb372583305308d78a138fe76c2f authorMatt Condon (shrugs) <mattgcondon@gmail.com> dateWed 12 Jun 2019, 17:25 (7 years ago) parent0770795
4 files changed+13−4
src/bridge/views/AcceptTransfer.js+5−1 src/bridge/views/CreateGalaxy.js+5−1 src/bridge/views/Point.js−1 src/bridge/views/Point/Actions.js+3−1
src/bridge/views/AcceptTransfer.js+5−1
@@ -16,6 +16,7 @@ import { NETWORK_TYPES } from '../lib/network';
1616import { isValidAddress } from '../lib/wallet';
1717import { withNetwork } from '../store/network';
1818import { compose } from '../lib/lib';
19+import { withWallet } from '../store/wallet';
1920
2021class AcceptTransfer extends React.Component {
2122 constructor(props) {
@@ -119,4 +120,7 @@ class AcceptTransfer extends React.Component {
119120 }
120121}
121122
122−export default compose(withNetwork)(AcceptTransfer);
123+export default compose(
124+ withNetwork,
125+ withWallet
126+)(AcceptTransfer);
src/bridge/views/CreateGalaxy.js+5−1
@@ -22,6 +22,7 @@ import { ETH_ZERO_ADDR, isValidAddress, eqAddr } from '../lib/wallet';
2222
2323import { isValidGalaxy, compose } from '../lib/lib';
2424import { withNetwork } from '../store/network';
25+import { withWallet } from '../store/wallet';
2526
2627const buttonTriState = status => {
2728 if (status === null) return 'blue';
@@ -195,4 +196,7 @@ class CreateGalaxy extends React.Component {
195196 }
196197}
197198
198−export default compose(withNetwork)(CreateGalaxy);
199+export default compose(
200+ withNetwork,
201+ withWallet
202+)(CreateGalaxy);
src/bridge/views/Point.js−1
@@ -123,7 +123,6 @@ class Point extends React.Component {
123123 {authenticated ? (
124124 <Actions
125125 online={online}
126− wallet={wallet}
127126 point={point}
128127 pointDetails={pointDetails}
129128 invites={this.state.invites}
src/bridge/views/Point/Actions.js+3−1
@@ -7,6 +7,7 @@ import { Row, Col, H2, P } from '../../components/Base';
77import { Button } from '../../components/Base';
88import { ROUTE_NAMES } from '../../lib/routeNames';
99import { useHistory } from '../../store/history';
10+import { useWallet } from '../../store/wallet';
1011
1112const isPlanet = point =>
1213 azimuth.getPointSize(point) === azimuth.PointSize.Planet;
@@ -14,9 +15,10 @@ const isStar = point => azimuth.getPointSize(point) === azimuth.PointSize.Star;
1415
1516function Actions(props) {
1617 const history = useHistory();
18+ const { wallet } = useWallet();
1719 const { online, point, pointDetails, invites } = props;
1820
19− const addr = need.address(props);
21+ const addr = need.address({ wallet });
2022
2123 const isOwner = pointDetails.matchWith({
2224 Nothing: _ => false,