Skip to content

Commit

Permalink
Code cleanup for wyre changes
Browse files Browse the repository at this point in the history
  • Loading branch information
danjm committed Sep 18, 2019
1 parent eae86c9 commit 81021f7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 17 deletions.
1 change: 0 additions & 1 deletion app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,6 @@ module.exports = class MetamaskController extends EventEmitter {
} else {
return Promise.resolve(this.keyringController.signPersonalMessage(msgParams))
}
return promise
}

/**
Expand Down
4 changes: 2 additions & 2 deletions test/unit/app/controllers/metamask-controller-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ describe('MetaMaskController', function () {
'data': data,
}

const promise = metamaskController.newUnsignedPersonalMessage(msgParams)
const promise = metamaskController.newUnsignedPersonalMessage(msgParams, {})
// handle the promise so it doesn't throw an unhandledRejection
promise.then(noop).catch(noop)

Expand All @@ -719,7 +719,7 @@ describe('MetaMaskController', function () {
'data': data,
}
try {
await metamaskController.newUnsignedPersonalMessage(msgParams)
await metamaskController.newUnsignedPersonalMessage(msgParams, {})
assert.fail('should have thrown')
} catch (error) {
assert.equal(error.message, 'MetaMask Message Signature: from field is required.')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ export default class SignatureRequestModal extends Component {
}

renderAccountDropdown () {
const { selectedAccount } = this.state

const {
accounts,
} = this.props

return <div className="request-signature__account">

<div className="request-signature__account-text">
Expand Down Expand Up @@ -160,8 +154,8 @@ export default class SignatureRequestModal extends Component {
>
{ this.context.t('learnMore') }
</span>,
]
}
]
}

return <div className="request-signature__body">
{ this.renderAccountInfo() }
Expand All @@ -172,7 +166,7 @@ export default class SignatureRequestModal extends Component {
'request-signature__warning': type === 'eth_sign',
})}
>
{ notice }
{ notice }
</div>
<div className="request-signature__rows">
{type === 'eth_signTypedData' && version === 'V3'
Expand Down
1 change: 0 additions & 1 deletion ui/app/helpers/constants/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const NEW_ACCOUNT_ROUTE = '/new-account'
const IMPORT_ACCOUNT_ROUTE = '/new-account/import'
const CONNECT_HARDWARE_ROUTE = '/new-account/connect'
const SEND_ROUTE = '/send'
const WELCOME_ROUTE = '/welcome'
const DEPOSIT_ROUTE = '/deposit'

const INITIALIZE_ROUTE = '/initialize'
Expand Down
6 changes: 2 additions & 4 deletions ui/app/pages/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class Routes extends Component {
}
}

componentDidUpdate (prevProps) {
componentDidUpdate () {
const {
waitingForWyreSigRequest,
unapprovedPersonalMsgs,
Expand Down Expand Up @@ -387,6 +387,7 @@ Routes.propTypes = {
showDepositModal: PropTypes.func,
waitForWyreSigRequest: PropTypes.func,
modal: PropTypes.object,
selectedAddress: PropTypes.string,
}

function mapStateToProps (state) {
Expand All @@ -397,8 +398,6 @@ function mapStateToProps (state) {
alertMessage,
isLoading,
loadingMessage,
waitingForWyreSigRequest,
modal,
} = appState

const { autoLogoutTimeLimit = 0 } = preferencesSelector(state)
Expand All @@ -408,7 +407,6 @@ function mapStateToProps (state) {
unapprovedMsgCount,
unapprovedPersonalMsgCount,
unapprovedTypedMessagesCount,
providerRequests,
unapprovedPersonalMsgs,
} = metamask

Expand Down

0 comments on commit 81021f7

Please sign in to comment.