Skip to content

Commit

Permalink
remove catchjs && add checker for private_keys
Browse files Browse the repository at this point in the history
  • Loading branch information
ety001 committed Nov 23, 2020
1 parent 70054ec commit 88a0737
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions src/app/components/modules/TronCreateOne.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ export default connect(
const tronErrMsg = state.app.has('tronErrMsg')
? state.app.get('tronErrMsg')
: null;
console.log(
'TEST has private_keys:',
currentUser,
currentUser && currentUser.has('private_keys')
);
return {
...ownProps,
loading: state.app.get('modalLoading'),
Expand Down
6 changes: 4 additions & 2 deletions src/app/redux/UserSaga.js
Original file line number Diff line number Diff line change
Expand Up @@ -900,8 +900,10 @@ function* updateTronAddr() {

// charge that which level private key we own.
let privateKeyType = null;
if (private_keys.has('active_private')) privateKeyType = 'active_private';
if (private_keys.has('posting_private')) privateKeyType = 'posting_private';
if (private_keys && private_keys.has('active_private'))
privateKeyType = 'active_private';
if (private_keys && private_keys.has('posting_private'))
privateKeyType = 'posting_private';
if (privateKeyType === null) {
console.log('there is no private key in browser cache.');
yield put(
Expand Down
5 changes: 2 additions & 3 deletions src/server/server-html.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,8 @@ export default function ServerHTML({
async
/>
) : null}
{process.env.NODE_ENV === 'production' && (
<script src="//cdn.catchjs.com/catch.js" />
)}
{process.env.NODE_ENV === 'production' &&
1 === 0 && <script src="//cdn.catchjs.com/catch.js" />}
<title>{page_title}</title>
</head>
<body>
Expand Down

0 comments on commit 88a0737

Please sign in to comment.