diff --git a/package.json b/package.json index 7b150ea358f5..5d2c3a90c633 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "eth-json-rpc-errors": "^2.0.0", "eth-json-rpc-filters": "^4.1.1", "eth-json-rpc-infura": "^4.0.1", - "eth-json-rpc-middleware": "^4.2.0", + "eth-json-rpc-middleware": "^4.4.0", "eth-keyring-controller": "^5.3.0", "eth-ledger-bridge-keyring": "^0.2.0", "eth-method-registry": "^1.2.0", @@ -122,7 +122,7 @@ "gaba": "^1.9.0", "human-standard-token-abi": "^2.0.0", "jazzicon": "^1.2.0", - "json-rpc-engine": "^5.1.5", + "json-rpc-engine": "^5.1.6", "json-rpc-middleware-stream": "^2.1.1", "jsonschema": "^1.2.4", "lodash.debounce": "^4.0.8", diff --git a/test/e2e/metamask-ui.spec.js b/test/e2e/metamask-ui.spec.js index e5b0ed93e43e..60c7167dc01c 100644 --- a/test/e2e/metamask-ui.spec.js +++ b/test/e2e/metamask-ui.spec.js @@ -569,11 +569,11 @@ describe('MetaMask', function () { await delay(regularDelayMs) let transactions = await findElements(driver, By.css('.transaction-list-item')) - await transactions[3].click() + await transactions[0].click() await delay(regularDelayMs) try { transactions = await findElements(driver, By.css('.transaction-list-item'), 1000) - await transactions[3].click() + await transactions[0].click() } catch (e) { console.log(e) } @@ -647,7 +647,7 @@ describe('MetaMask', function () { navigationElement = await findElement(driver, By.css('.confirm-page-container-navigation')) navigationText = await navigationElement.getText() - assert.equal(navigationText.includes('3'), true, 'correct transaction in focus') + assert.equal(navigationText.includes('2'), true, 'correct (same) transaction in focus') }) it('confirms a transaction', async () => { @@ -854,9 +854,9 @@ describe('MetaMask', function () { it('renders the correct ETH balance', async () => { const balance = await findElement(driver, By.css('.transaction-view-balance__primary-balance')) await delay(regularDelayMs) - await driver.wait(until.elementTextMatches(balance, /^87.*\s*ETH.*$/), 10000) + await driver.wait(until.elementTextMatches(balance, /^90.*\s*ETH.*$/), 10000) const tokenAmount = await balance.getText() - assert.ok(/^87.*\s*ETH.*$/.test(tokenAmount)) + assert.ok(/^90.*\s*ETH.*$/.test(tokenAmount)) await delay(regularDelayMs) }) }) diff --git a/test/integration/lib/confirm-sig-requests.js b/test/integration/lib/confirm-sig-requests.js index b5b4e171fc44..fa6c3d09025a 100644 --- a/test/integration/lib/confirm-sig-requests.js +++ b/test/integration/lib/confirm-sig-requests.js @@ -36,8 +36,8 @@ async function runConfirmSigRequestsTest (assert) { const pendingRequestItem = $.find('.transaction-list-item .transaction-list-item__grid') - if (pendingRequestItem[2]) { - pendingRequestItem[2].click() + if (pendingRequestItem[0]) { + pendingRequestItem[0].click() } await timeout(1000) @@ -45,11 +45,9 @@ async function runConfirmSigRequestsTest (assert) { let confirmSigHeadline = await queryAsync($, '.request-signature__headline') assert.equal(confirmSigHeadline[0].textContent, 'Your signature is being requested') - const confirmSigMessage = await queryAsync($, '.request-signature__notice') - assert.ok(confirmSigMessage[0].textContent.match(/^Signing\sthis\smessage/)) - let confirmSigRowValue = await queryAsync($, '.request-signature__row-value') - assert.equal(confirmSigRowValue[0].textContent, '0x879a053d4800c6354e76c7985a865d2922c82fb5b3f4577b2fe08b998954f2e0') + assert.equal(confirmSigRowValue[0].textContent, 'Hi, Alice!') + assert.equal(confirmSigRowValue[1].textContent, '1337') let confirmSigSignButton = await queryAsync($, 'button.btn-secondary.btn--large') confirmSigSignButton[0].click() @@ -66,9 +64,11 @@ async function runConfirmSigRequestsTest (assert) { confirmSigHeadline = await queryAsync($, '.request-signature__headline') assert.equal(confirmSigHeadline[0].textContent, 'Your signature is being requested') + const confirmSigMessage = await queryAsync($, '.request-signature__notice') + assert.ok(confirmSigMessage[0].textContent.match(/^Signing\sthis\smessage/)) + confirmSigRowValue = await queryAsync($, '.request-signature__row-value') - assert.equal(confirmSigRowValue[0].textContent, 'Hi, Alice!') - assert.equal(confirmSigRowValue[1].textContent, '1337') + assert.equal(confirmSigRowValue[0].textContent, '0x879a053d4800c6354e76c7985a865d2922c82fb5b3f4577b2fe08b998954f2e0') confirmSigSignButton = await queryAsync($, 'button.btn-secondary.btn--large') confirmSigSignButton[0].click() diff --git a/ui/app/components/ui/button/button.component.js b/ui/app/components/ui/button/button.component.js index a43c140a287f..a059a7f00888 100644 --- a/ui/app/components/ui/button/button.component.js +++ b/ui/app/components/ui/button/button.component.js @@ -26,7 +26,7 @@ const typeHash = { const Button = ({ type, submit, large, children, className, ...buttonProps }) => (