Skip to content

Commit

Permalink
Update TransactionContext.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
developer-junaid authored Jan 14, 2022
1 parent 093ac45 commit 18e6f7f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions client/src/context/TransactionContext.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ export const TransactionsProvider = ({ children }) => {
const availableTransactions = await transactionsContract.getAllTransactions();

const structuredTransactions = availableTransactions.map((transaction) => ({
addressTo: transaction.receiver,
addressFrom: transaction.sender,
timestamp: new Date(transaction.timestamp.toNumber() * 1000).toLocaleString(),
message: transaction.message,
keyword: transaction.keyword,
amount: parseInt(transaction.amount._hex) / 10 ** 18
addressTo: transaction.receiver,
addressFrom: transaction.sender,
timestamp: new Date(transaction.timestamp.toNumber() * 1000).toLocaleString(),
message: transaction.message,
keyword: transaction.keyword,
amount: parseInt(transaction.amount._hex) / 10 ** 18
}));

console.log(structuredTransactions);
Expand Down

0 comments on commit 18e6f7f

Please sign in to comment.