Skip to content

Commit

Permalink
Merge pull request #207 from tryiou/dev
Browse files Browse the repository at this point in the history
fix for 'unspent page'
  • Loading branch information
ConanMishler authored Dec 5, 2023
2 parents b8ac164 + 3318131 commit 4522ecf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/components/shared/transactions-panel-table.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2020 The Blocknet developers
// Distributed under the MIT software license, see the accompanying
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
import React, {useState, useEffect} from 'react';
import React, {useMemo, useState, useEffect} from 'react';
import PropTypes from 'prop-types';
import {Card, CardBody, CardFooter, CardHeader} from './card';
import TransactionsHeader from './transactions-panel-header';
Expand All @@ -25,7 +25,9 @@ const TransactionsPanelTable = ({

const [transactions, setTransactions] = useState([]);
const walletLookup = new Map(wallets.map(t => [t.ticker, t]));
const sortedWallets = activeWallet ? [wallets.find(w => w.ticker === activeWallet)] : wallets.sort(walletSorter(balances));
const sortedWallets = useMemo(() => activeWallet
? [wallets.find(w => w.ticker === activeWallet)]
: wallets.sort(walletSorter(balances)), [wallets, activeWallet]);

// ToDo: enable Select, Label, and Date columns when available
const hiddenFeature = true;
Expand Down

0 comments on commit 4522ecf

Please sign in to comment.