Skip to content

Commit

Permalink
fix: TransactionList loading
Browse files Browse the repository at this point in the history
  • Loading branch information
alper95polat committed Aug 19, 2021
1 parent 894f6fe commit 0657e5c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
28 changes: 15 additions & 13 deletions popup-src/src/pageComponents/TransactionList/index.jsx
Expand Up @@ -60,12 +60,15 @@ const TransactionList = ({ maxHeight }) => {

useEffect(() => {
(async () => {
const transactions = await getTransactions(activeAccount.publicKey);
const operations = await getOperations(transactions);
if (isLoading) {
console.log('bam');
const transactions = await getTransactions(activeAccount.publicKey);
const operations = await getOperations(transactions);

setOperationList(operations);
setTransactionList(transactions);
setIsLoading(false);
setOperationList(operations);
setTransactionList(transactions);
setIsLoading(false);
}
})();
});

Expand All @@ -78,14 +81,13 @@ const TransactionList = ({ maxHeight }) => {
{operationList && operationList.length > 0 ? (
<ul className={classNames(styles.list, 'hidden-scroll')} style={{ maxHeight: `${maxHeight}px` }}>
{operationList.map((item, index) => (
<Fragment key={shortid.generate()}>
<Item
item={item}
index={index}
operationList={operationList}
transactionList={transactionList}
/>
</Fragment>
<Item
key={item.id}
item={item}
index={index}
operationList={operationList}
transactionList={transactionList}
/>
))}
</ul>
)
Expand Down
1 change: 1 addition & 0 deletions popup-src/src/pages/Setting/index.jsx
Expand Up @@ -276,6 +276,7 @@ class Setting extends Component {

<p className={styles.version}>
Version
{' '}
{config.VERSION}
</p>
</div>
Expand Down

0 comments on commit 0657e5c

Please sign in to comment.