From 0527d02216862fc82d1c229ca9ac5b08178fa564 Mon Sep 17 00:00:00 2001 From: Alexander Tseung Date: Thu, 4 Oct 2018 14:52:49 -0700 Subject: [PATCH] Reverse pending transactions order --- test/integration/lib/tx-list-items.js | 4 ++-- ui/app/selectors/transactions.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/integration/lib/tx-list-items.js b/test/integration/lib/tx-list-items.js index f64a8d7de..ed4f82074 100644 --- a/test/integration/lib/tx-list-items.js +++ b/test/integration/lib/tx-list-items.js @@ -32,7 +32,7 @@ async function runTxListItemsTest (assert, done) { const txListItems = await queryAsync($, '.transaction-list-item') assert.equal(txListItems.length, 8, 'all tx list items are rendered') - const retryTxGrid = await findAsync($(txListItems[1]), '.transaction-list-item__grid') + const retryTxGrid = await findAsync($(txListItems[2]), '.transaction-list-item__grid') retryTxGrid[0].click() const retryTxDetails = await findAsync($, '.transaction-list-item-details') const headerButtons = await findAsync($(retryTxDetails[0]), '.transaction-list-item-details__header-button') @@ -42,7 +42,7 @@ async function runTxListItemsTest (assert, done) { const approvedTxRenderedStatus = await findAsync($(approvedTx), '.transaction-list-item__status') assert.equal(approvedTxRenderedStatus[0].textContent, 'pending', 'approvedTx has correct label') - const unapprovedMsg = txListItems[3] + const unapprovedMsg = txListItems[0] const unapprovedMsgDescription = await findAsync($(unapprovedMsg), '.transaction-list-item__action') assert.equal(unapprovedMsgDescription[0].textContent, 'Signature Request', 'unapprovedMsg has correct description') diff --git a/ui/app/selectors/transactions.js b/ui/app/selectors/transactions.js index 3e9843722..479002794 100644 --- a/ui/app/selectors/transactions.js +++ b/ui/app/selectors/transactions.js @@ -39,7 +39,7 @@ export const transactionsSelector = createSelector( export const pendingTransactionsSelector = createSelector( transactionsSelector, (transactions = []) => ( - transactions.filter(transaction => transaction.status in pendingStatusHash) + transactions.filter(transaction => transaction.status in pendingStatusHash).reverse() ) )