1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Merge pull request #5428 from alextsg/i5372-queue-order

Reverse pending transactions order
This commit is contained in:
Dan Finlay 2018-10-05 11:07:44 -07:00 committed by GitHub
commit c8521e49ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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')

View File

@ -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()
)
)