Skip to content

Commit

Permalink
fixed payeeName query bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen-Gordon committed Apr 7, 2024
1 parent c1281e2 commit 8d0cf71
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/@auth/(.)transaction/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@ export default function Page() {

useEffect(() => {
const filteredTransaction = transactionState.filter(
(tx: any) => tx.blockHash.toLocaleLowerCase() == hash
(tx: any) => tx.blockHash.toLocaleLowerCase() == hash?.toLocaleLowerCase()
);

setTransaction(filteredTransaction[0]);

setPayeeName(filteredTransaction.to);
setPayeeName(filteredTransaction[0]?.to);
console.log('payeeName in transaction page', filteredTransaction);
}, [transactionState, hash]);

return (
Expand Down

0 comments on commit 8d0cf71

Please sign in to comment.