// @flow import React from 'react'; import Button from 'component/button'; import Card from 'component/common/card'; import moment from 'moment'; type Props = { accountDetails: any, transactions: any, }; const WalletBalance = (props: Props) => { // receive transactions from parent component const { transactions } = props; let accountTransactions; // reverse so most recent payments come first if (transactions && transactions.length) { accountTransactions = transactions.reverse(); } // if there are more than 10 transactions, limit it to 10 for the frontend // if (accountTransactions && accountTransactions.length > 10) { // accountTransactions.length = 10; // } return (
{accountTransactions && accountTransactions.map((transaction) => ( ))}
{__('Date')} {<>{__('Receiving Channel Name')}} {__('Tip Location')} {__('Amount (USD)')} {__('Processing Fee')} {__('Odysee Fee')} {__('Received Amount')}
{moment(transaction.created_at).format('LLL')} ${transaction.tipped_amount / 100} ${transaction.transaction_fee / 100} ${transaction.application_fee / 100} ${transaction.received_amount / 100}
{!accountTransactions &&

No Transactions

}
); }; export default WalletBalance;