Skip to content

Commit 85eb7e7

Browse files
Cleaning unused code from routes and nodeConection
1 parent 171f20d commit 85eb7e7

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

examples/wallet/app/actions/router.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,13 @@ import { push } from 'connected-react-router';
33
import type { Dispatch, GetState } from '../reducers/types';
44
import type { Address } from '../models';
55
import routes from '../constants/routes';
6-
import { setAccountFromPrivateKey } from './account';
76

8-
import {
9-
isSpedingPasswordCreated,
10-
readAccountKeysFromDEN
11-
} from '../utils/storage';
7+
import { isSpedingPasswordCreated } from '../utils/storage';
128

139
// eslint-disable-next-line import/prefer-default-export
1410
export const redirectToFirstAppPage = () => {
1511
return (dispatch: Dispatch, getState: GetState) => {
1612
if (isSpedingPasswordCreated()) return dispatch(push(routes.UNLOCK_WALLET));
17-
18-
const accountKeys = readAccountKeysFromDEN('manteca');
19-
if (accountKeys !== undefined) {
20-
return dispatch(setAccountFromPrivateKey(accountKeys.privateKey));
21-
}
2213
const {
2314
account: { address }
2415
}: { account: { address: Address } } = getState();

examples/wallet/app/utils/nodeConnection.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,9 @@ export function getAccountState(identifier: Identifier): Promise<AccountState> {
3939
}))
4040
.catch(error => {
4141
if (error && error.response && error.response.status === 404) {
42-
const hardcoded = {
43-
hardBalance: 0,
44-
hardCounter: 0,
45-
hardDelegation: { '00000x': { parts: 1 } }
46-
};
47-
const balance: Balance = hardcoded.hardBalance;
48-
const counter: Counter = hardcoded.hardCounter;
49-
const delegation: Delegation = hardcoded.hardDelegation;
42+
const balance: Balance = 0;
43+
const counter: Counter = 0;
44+
const delegation: Delegation = { '00000x': { parts: 1 } };
5045
return {
5146
balance,
5247
counter,

0 commit comments

Comments
 (0)