mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 04:41:43 +03:00
Fixed transaction nan value
This commit is contained in:
parent
9403e9ef44
commit
0021006588
@ -56,7 +56,7 @@ class TransactionView extends PureComponent {
|
|||||||
const transactionData = groomingTransactionData(item, steemPerMVests, formatNumber);
|
const transactionData = groomingTransactionData(item, steemPerMVests, formatNumber);
|
||||||
if (transactionData.length === 0) return null;
|
if (transactionData.length === 0) return null;
|
||||||
|
|
||||||
const value = transactionData.value.split(' ');
|
const value = transactionData.value.trim().split(' ');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CollapsibleCard
|
<CollapsibleCard
|
||||||
@ -85,7 +85,7 @@ class TransactionView extends PureComponent {
|
|||||||
{(get(transactionData, 'details') || get(transactionData, 'memo')) && (
|
{(get(transactionData, 'details') || get(transactionData, 'memo')) && (
|
||||||
<WalletLineItem
|
<WalletLineItem
|
||||||
key={index.toString()}
|
key={index.toString()}
|
||||||
text={get(transactionData, 'details', 'pipi')}
|
text={get(transactionData, 'details')}
|
||||||
isBlackText
|
isBlackText
|
||||||
isThin
|
isThin
|
||||||
description={get(transactionData, 'memo')}
|
description={get(transactionData, 'memo')}
|
||||||
|
@ -25,7 +25,7 @@ export const groomingTransactionData = (transaction, steemPerMVests, formatNumbe
|
|||||||
|
|
||||||
result.value = `${formatNumber(vestsToSp(parseToken(reward), steemPerMVests), {
|
result.value = `${formatNumber(vestsToSp(parseToken(reward), steemPerMVests), {
|
||||||
minimumFractionDigits: 3,
|
minimumFractionDigits: 3,
|
||||||
})} SP`;
|
}).replace(',', '.')} SP`;
|
||||||
result.details = commentAuthor ? `@${commentAuthor}/${commentPermlink}` : null;
|
result.details = commentAuthor ? `@${commentAuthor}/${commentPermlink}` : null;
|
||||||
break;
|
break;
|
||||||
case 'author_reward':
|
case 'author_reward':
|
||||||
@ -38,11 +38,17 @@ export const groomingTransactionData = (transaction, steemPerMVests, formatNumbe
|
|||||||
|
|
||||||
const { author, permlink } = opData;
|
const { author, permlink } = opData;
|
||||||
|
|
||||||
sbdPayout = formatNumber(parseToken(sbdPayout), { minimumFractionDigits: 3 });
|
sbdPayout = formatNumber(parseToken(sbdPayout), { minimumFractionDigits: 3 }).replace(
|
||||||
steemPayout = formatNumber(parseToken(steemPayout), { minimumFractionDigits: 3 });
|
',',
|
||||||
|
'.',
|
||||||
|
);
|
||||||
|
steemPayout = formatNumber(parseToken(steemPayout), { minimumFractionDigits: 3 }).replace(
|
||||||
|
',',
|
||||||
|
'.',
|
||||||
|
);
|
||||||
vestingPayout = formatNumber(vestsToSp(parseToken(vestingPayout), steemPerMVests), {
|
vestingPayout = formatNumber(vestsToSp(parseToken(vestingPayout), steemPerMVests), {
|
||||||
minimumFractionDigits: 3,
|
minimumFractionDigits: 3,
|
||||||
});
|
}).replace(',', '.');
|
||||||
|
|
||||||
result.value = `${sbdPayout > 0 ? `${sbdPayout} SBD` : ''} ${
|
result.value = `${sbdPayout > 0 ? `${sbdPayout} SBD` : ''} ${
|
||||||
steemPayout > 0 ? `${steemPayout} steemPayout` : ''
|
steemPayout > 0 ? `${steemPayout} steemPayout` : ''
|
||||||
@ -56,11 +62,17 @@ export const groomingTransactionData = (transaction, steemPerMVests, formatNumbe
|
|||||||
case 'claim_reward_balance':
|
case 'claim_reward_balance':
|
||||||
let { reward_sbd: rewardSdb, reward_steem: rewardSteem, reward_vests: rewardVests } = opData;
|
let { reward_sbd: rewardSdb, reward_steem: rewardSteem, reward_vests: rewardVests } = opData;
|
||||||
|
|
||||||
rewardSdb = formatNumber(parseToken(rewardSdb), { minimumFractionDigits: 3 });
|
rewardSdb = formatNumber(parseToken(rewardSdb), { minimumFractionDigits: 3 }).replace(
|
||||||
rewardSteem = formatNumber(parseToken(rewardSteem), { minimumFractionDigits: 3 });
|
',',
|
||||||
|
'.',
|
||||||
|
);
|
||||||
|
rewardSteem = formatNumber(parseToken(rewardSteem), { minimumFractionDigits: 3 }).replace(
|
||||||
|
',',
|
||||||
|
'.',
|
||||||
|
);
|
||||||
rewardVests = formatNumber(vestsToSp(parseToken(rewardVests), steemPerMVests), {
|
rewardVests = formatNumber(vestsToSp(parseToken(rewardVests), steemPerMVests), {
|
||||||
minimumFractionDigits: 3,
|
minimumFractionDigits: 3,
|
||||||
});
|
}).replace(',', '.');
|
||||||
|
|
||||||
result.value = `${rewardSdb > 0 ? `${rewardSdb} SBD` : ''} ${
|
result.value = `${rewardSdb > 0 ? `${rewardSdb} SBD` : ''} ${
|
||||||
rewardSteem > 0 ? `${rewardSteem} STEEM` : ''
|
rewardSteem > 0 ? `${rewardSteem} STEEM` : ''
|
||||||
@ -82,7 +94,7 @@ export const groomingTransactionData = (transaction, steemPerMVests, formatNumbe
|
|||||||
opVestingShares = parseToken(opVestingShares);
|
opVestingShares = parseToken(opVestingShares);
|
||||||
result.value = `${formatNumber(vestsToSp(opVestingShares, steemPerMVests), {
|
result.value = `${formatNumber(vestsToSp(opVestingShares, steemPerMVests), {
|
||||||
minimumFractionDigits: 3,
|
minimumFractionDigits: 3,
|
||||||
})} SP`;
|
}).replace(',', '.')} SP`;
|
||||||
result.icon = 'attach-money';
|
result.icon = 'attach-money';
|
||||||
result.details = acc ? `@${acc}` : null;
|
result.details = acc ? `@${acc}` : null;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user