on master help sign in
fix: convert more instances of wallet usage to new store
1faa15cMatt Condon (shrugs)
src/bridge/views/AcceptTransfer.js+5−1
@@ -16,6 +16,7 @@ import { NETWORK_TYPES } from '../lib/network';
16import { isValidAddress } from '../lib/wallet';
16import { isValidAddress } from '../lib/wallet';
17import { withNetwork } from '../store/network';
17import { withNetwork } from '../store/network';
18import { compose } from '../lib/lib';
18import { compose } from '../lib/lib';
19+import { withWallet } from '../store/wallet';
19
20
20class AcceptTransfer extends React.Component {
21class AcceptTransfer extends React.Component {
21 constructor(props) {
22 constructor(props) {
@@ -119,4 +120,7 @@ class AcceptTransfer extends React.Component {
119 }
120 }
120}
121}
121
122
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';
22
22
23import { isValidGalaxy, compose } from '../lib/lib';
23import { isValidGalaxy, compose } from '../lib/lib';
24import { withNetwork } from '../store/network';
24import { withNetwork } from '../store/network';
25+import { withWallet } from '../store/wallet';
25
26
26const buttonTriState = status => {
27const buttonTriState = status => {
27 if (status === null) return 'blue';
28 if (status === null) return 'blue';
@@ -195,4 +196,7 @@ class CreateGalaxy extends React.Component {
195 }
196 }
196}
197}
197
198
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 {
123 {authenticated ? (
123 {authenticated ? (
124 <Actions
124 <Actions
125 online={online}
125 online={online}
126− wallet={wallet}
127 point={point}
126 point={point}
128 pointDetails={pointDetails}
127 pointDetails={pointDetails}
129 invites={this.state.invites}
128 invites={this.state.invites}
src/bridge/views/Point/Actions.js+3−1
@@ -7,6 +7,7 @@ import { Row, Col, H2, P } from '../../components/Base';
7import { Button } from '../../components/Base';
7import { Button } from '../../components/Base';
8import { ROUTE_NAMES } from '../../lib/routeNames';
8import { ROUTE_NAMES } from '../../lib/routeNames';
9import { useHistory } from '../../store/history';
9import { useHistory } from '../../store/history';
10+import { useWallet } from '../../store/wallet';
10
11
11const isPlanet = point =>
12const isPlanet = point =>
12 azimuth.getPointSize(point) === azimuth.PointSize.Planet;
13 azimuth.getPointSize(point) === azimuth.PointSize.Planet;
@@ -14,9 +15,10 @@ const isStar = point => azimuth.getPointSize(point) === azimuth.PointSize.Star;
14
15
15function Actions(props) {
16function Actions(props) {
16 const history = useHistory();
17 const history = useHistory();
18+ const { wallet } = useWallet();
17 const { online, point, pointDetails, invites } = props;
19 const { online, point, pointDetails, invites } = props;
18
20
19− const addr = need.address(props);
21+ const addr = need.address({ wallet });
20
22
21 const isOwner = pointDetails.matchWith({
23 const isOwner = pointDetails.matchWith({
22 Nothing: _ => false,
24 Nothing: _ => false,