fix remaining asset names

This commit is contained in:
feruz 2020-03-24 10:02:37 +02:00
parent bf22f3c76e
commit b875f14f95
2 changed files with 14 additions and 36 deletions

26
shim.js
View File

@ -1,26 +0,0 @@
if (typeof __dirname === 'undefined') global.__dirname = '/';
if (typeof __filename === 'undefined') global.__filename = '';
if (typeof process === 'undefined') {
global.process = require('process');
} else {
const bProcess = require('process');
for (var p in bProcess) {
if (!(p in process)) {
process[p] = bProcess[p];
}
}
}
process.browser = false;
if (typeof Buffer === 'undefined') global.Buffer = require('buffer').Buffer;
// global.location = global.location || { port: 80 }
const isDev = typeof __DEV__ === 'boolean' && __DEV__;
process.env.NODE_ENV = isDev ? 'development' : 'production';
if (typeof localStorage !== 'undefined') {
localStorage.debug = isDev ? '*' : '';
}
// If using the crypto shim, uncomment the following line to ensure
// crypto is loaded first, so it can populate global.crypto
require('crypto');

View File

@ -10,7 +10,9 @@ export const groomingTransactionData = (transaction, steemPerMVests) => {
return [];
}
const result = { iconType: 'MaterialIcons' };
const result = {
iconType: 'MaterialIcons',
};
[result.textKey] = transaction[1].op;
const opData = transaction[1].op[1];
@ -28,7 +30,7 @@ export const groomingTransactionData = (transaction, steemPerMVests) => {
result.value = `${vestsToSp(parseToken(reward), steemPerMVests)
.toFixed(3)
.replace(',', '.')} SP`;
.replace(',', '.')} HP`;
result.details = commentAuthor ? `@${commentAuthor}/${commentPermlink}` : null;
break;
case 'author_reward':
@ -51,9 +53,9 @@ export const groomingTransactionData = (transaction, steemPerMVests) => {
.toFixed(3)
.replace(',', '.');
result.value = `${sbdPayout > 0 ? `${sbdPayout} SBD` : ''} ${
steemPayout > 0 ? `${steemPayout} STEEM` : ''
} ${vestingPayout > 0 ? `${vestingPayout} SP` : ''}`;
result.value = `${sbdPayout > 0 ? `${sbdPayout} HBD` : ''} ${
steemPayout > 0 ? `${steemPayout} HIVE` : ''
} ${vestingPayout > 0 ? `${vestingPayout} HP` : ''}`;
result.details = author && permlink ? `@${author}/${permlink}` : null;
if (result.textKey === 'comment_benefactor_reward') {
@ -73,9 +75,9 @@ export const groomingTransactionData = (transaction, steemPerMVests) => {
.toFixed(3)
.replace(',', '.');
result.value = `${rewardSdb > 0 ? `${rewardSdb} SBD` : ''} ${
rewardSteem > 0 ? `${rewardSteem} STEEM` : ''
} ${rewardVests > 0 ? `${rewardVests} SP` : ''}`;
result.value = `${rewardSdb > 0 ? `${rewardSdb} HBD` : ''} ${
rewardSteem > 0 ? `${rewardSteem} HIVE` : ''
} ${rewardVests > 0 ? `${rewardVests} HP` : ''}`;
break;
case 'transfer':
case 'transfer_to_savings':
@ -95,7 +97,7 @@ export const groomingTransactionData = (transaction, steemPerMVests) => {
opVestingShares = parseToken(opVestingShares);
result.value = `${vestsToSp(opVestingShares, steemPerMVests)
.toFixed(3)
.replace(',', '.')} SP`;
.replace(',', '.')} HP`;
result.icon = 'attach-money';
result.details = acc ? `@${acc}` : null;
break;
@ -246,7 +248,9 @@ export const groomingPointsTransactionData = transaction => {
if (!transaction) {
return null;
}
const result = { ...transaction };
const result = {
...transaction,
};
result.details = get(transaction, 'sender')
? `from @${get(transaction, 'sender')}`