feature: add transactionId in get transactions query
This commit is contained in:
parent
fee6dca6dc
commit
c3f43c9e85
|
@ -46,20 +46,23 @@ export const TransactionDailyComponent = ({
|
|||
<Wrapper>
|
||||
<Day value={transactionsDate} />
|
||||
<TransactionsWrapper>
|
||||
{transactions.map(({
|
||||
date, type, address, amount,
|
||||
}, idx) => (
|
||||
<Fragment key={`${address}-${type}-${amount}-${date}`}>
|
||||
<TransactionItemComponent
|
||||
type={type}
|
||||
date={date}
|
||||
address={address || ''}
|
||||
amount={amount}
|
||||
zecPrice={zecPrice}
|
||||
/>
|
||||
{idx < transactions.length - 1 && <Divider />}
|
||||
</Fragment>
|
||||
))}
|
||||
{transactions.map(
|
||||
({
|
||||
date, type, address, amount, transactionId,
|
||||
}, idx) => (
|
||||
<Fragment key={`${address}-${type}-${amount}-${date}`}>
|
||||
<TransactionItemComponent
|
||||
transactionId={transactionId}
|
||||
type={type}
|
||||
date={date}
|
||||
address={address || ''}
|
||||
amount={amount}
|
||||
zecPrice={zecPrice}
|
||||
/>
|
||||
{idx < transactions.length - 1 && <Divider />}
|
||||
</Fragment>
|
||||
),
|
||||
)}
|
||||
</TransactionsWrapper>
|
||||
</Wrapper>
|
||||
);
|
||||
|
|
|
@ -41,9 +41,7 @@ const mapDispatchToProps = (dispatch: Dispatch) => ({
|
|||
// eslint-disable-next-line
|
||||
if (addressesErr) return dispatch(loadWalletSummaryError({ error: addressesErr.message }));
|
||||
|
||||
const [transactionsErr, transactions = []] = await eres(
|
||||
rpc.listtransactions(),
|
||||
);
|
||||
const [transactionsErr, transactions] = await eres(rpc.listtransactions());
|
||||
|
||||
if (transactionsErr) {
|
||||
return dispatch(
|
||||
|
@ -59,6 +57,7 @@ const mapDispatchToProps = (dispatch: Dispatch) => ({
|
|||
addresses,
|
||||
transactions: flow([
|
||||
arr => arr.map(transaction => ({
|
||||
transactionId: transaction.txid,
|
||||
type: transaction.category,
|
||||
date: new Date(transaction.time * 1000).toISOString(),
|
||||
address: transaction.address,
|
||||
|
|
|
@ -42,6 +42,7 @@ const mapDispatchToProps = (dispatch: Dispatch) => ({
|
|||
loadTransactionsSuccess({
|
||||
list: flow([
|
||||
arr => arr.map(transaction => ({
|
||||
transactionId: transaction.txid,
|
||||
type: transaction.category,
|
||||
date: new Date(transaction.time * 1000).toISOString(),
|
||||
address: transaction.address,
|
||||
|
|
Loading…
Reference in New Issue