Rename confusing permissions-connect variable (#8925)

feature/default_network_editable
Erik Marks 4 years ago committed by GitHub
parent 2f2cf07ef5
commit e20e42bb17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      ui/app/pages/permissions-connect/permissions-connect.component.js
  2. 5
      ui/app/pages/permissions-connect/permissions-connect.container.js

@ -26,7 +26,7 @@ export default class PermissionConnect extends Component {
addressLastConnectedMap: PropTypes.object.isRequired,
lastConnectedInfo: PropTypes.object.isRequired,
permissionsRequestId: PropTypes.string,
hasPendingPermissionsRequests: PropTypes.bool.isRequired,
hasAdditionalPermissionsRequests: PropTypes.bool.isRequired,
history: PropTypes.object.isRequired,
connectPath: PropTypes.string.isRequired,
confirmPermissionPath: PropTypes.string.isRequired,
@ -143,10 +143,10 @@ export default class PermissionConnect extends Component {
}
_doRedirect () {
const { history, hasPendingPermissionsRequests } = this.props
const { history, hasAdditionalPermissionsRequests } = this.props
if (
!hasPendingPermissionsRequests &&
!hasAdditionalPermissionsRequests &&
getEnvironmentType() === ENVIRONMENT_TYPE_NOTIFICATION
) {
global.platform.closeCurrentWindow()

@ -34,7 +34,8 @@ const mapStateToProps = (state, ownProps) => {
const permissionsRequest = permissionsRequests
.find((permissionsRequest) => permissionsRequest.metadata.id === permissionsRequestId)
const hasPendingPermissionsRequests = permissionsRequest
// used to determine whether to redirect or show the next permissions request
const hasAdditionalPermissionsRequests = permissionsRequest
? permissionsRequests.length > 1
: permissionsRequests.length > 0
@ -82,7 +83,7 @@ const mapStateToProps = (state, ownProps) => {
return {
permissionsRequest,
permissionsRequestId,
hasPendingPermissionsRequests,
hasAdditionalPermissionsRequests,
accounts: accountsWithLabels,
currentAddress,
origin,

Loading…
Cancel
Save