Skip to content

Commit

Permalink
bugfix/accounts undefined (#2120)
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanmino authored and wachunei committed Jan 19, 2021
1 parent 36e6ef9 commit 04d3817
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/components/UI/AccountApproval/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class AccountApproval extends PureComponent {
}

const mapStateToProps = state => ({
accountsLength: Object.keys(state.engine.backgroundState.AccountTrackerController.accounts).length,
accountsLength: Object.keys(state.engine.backgroundState.AccountTrackerController.accounts || {}).length,
tokensLength: state.engine.backgroundState.AssetsController.tokens.length,
networkType: state.engine.backgroundState.NetworkController.provider.type
});
Expand Down
2 changes: 1 addition & 1 deletion app/components/UI/ApproveTransactionReview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ const mapStateToProps = state => ({
currentCurrency: state.engine.backgroundState.CurrencyRateController.currentCurrency,
ticker: state.engine.backgroundState.NetworkController.provider.ticker,
transaction: getNormalizedTxState(state),
accountsLength: Object.keys(state.engine.backgroundState.AccountTrackerController.accounts).length,
accountsLength: Object.keys(state.engine.backgroundState.AccountTrackerController.accounts || {}).length,
tokensLength: state.engine.backgroundState.AssetsController.tokens.length,
providerType: state.engine.backgroundState.NetworkController.provider.type,
primaryCurrency: state.settings.primaryCurrency,
Expand Down
2 changes: 1 addition & 1 deletion app/components/Views/ApproveView/Approve/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ const mapStateToProps = state => ({
ticker: state.engine.backgroundState.NetworkController.provider.ticker,
transaction: getNormalizedTxState(state),
transactions: state.engine.backgroundState.TransactionController.transactions,
accountsLength: Object.keys(state.engine.backgroundState.AccountTrackerController.accounts).length,
accountsLength: Object.keys(state.engine.backgroundState.AccountTrackerController.accounts || {}).length,
tokensLength: state.engine.backgroundState.AssetsController.tokens.length,
providerType: state.engine.backgroundState.NetworkController.provider.type
});
Expand Down

0 comments on commit 04d3817

Please sign in to comment.