mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-28 01:52:56 +03:00
fix remaining asset names
This commit is contained in:
parent
bf22f3c76e
commit
b875f14f95
26
shim.js
26
shim.js
@ -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');
|
|
@ -10,7 +10,9 @@ export const groomingTransactionData = (transaction, steemPerMVests) => {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = { iconType: 'MaterialIcons' };
|
const result = {
|
||||||
|
iconType: 'MaterialIcons',
|
||||||
|
};
|
||||||
|
|
||||||
[result.textKey] = transaction[1].op;
|
[result.textKey] = transaction[1].op;
|
||||||
const opData = transaction[1].op[1];
|
const opData = transaction[1].op[1];
|
||||||
@ -28,7 +30,7 @@ export const groomingTransactionData = (transaction, steemPerMVests) => {
|
|||||||
|
|
||||||
result.value = `${vestsToSp(parseToken(reward), steemPerMVests)
|
result.value = `${vestsToSp(parseToken(reward), steemPerMVests)
|
||||||
.toFixed(3)
|
.toFixed(3)
|
||||||
.replace(',', '.')} SP`;
|
.replace(',', '.')} HP`;
|
||||||
result.details = commentAuthor ? `@${commentAuthor}/${commentPermlink}` : null;
|
result.details = commentAuthor ? `@${commentAuthor}/${commentPermlink}` : null;
|
||||||
break;
|
break;
|
||||||
case 'author_reward':
|
case 'author_reward':
|
||||||
@ -51,9 +53,9 @@ export const groomingTransactionData = (transaction, steemPerMVests) => {
|
|||||||
.toFixed(3)
|
.toFixed(3)
|
||||||
.replace(',', '.');
|
.replace(',', '.');
|
||||||
|
|
||||||
result.value = `${sbdPayout > 0 ? `${sbdPayout} SBD` : ''} ${
|
result.value = `${sbdPayout > 0 ? `${sbdPayout} HBD` : ''} ${
|
||||||
steemPayout > 0 ? `${steemPayout} STEEM` : ''
|
steemPayout > 0 ? `${steemPayout} HIVE` : ''
|
||||||
} ${vestingPayout > 0 ? `${vestingPayout} SP` : ''}`;
|
} ${vestingPayout > 0 ? `${vestingPayout} HP` : ''}`;
|
||||||
|
|
||||||
result.details = author && permlink ? `@${author}/${permlink}` : null;
|
result.details = author && permlink ? `@${author}/${permlink}` : null;
|
||||||
if (result.textKey === 'comment_benefactor_reward') {
|
if (result.textKey === 'comment_benefactor_reward') {
|
||||||
@ -73,9 +75,9 @@ export const groomingTransactionData = (transaction, steemPerMVests) => {
|
|||||||
.toFixed(3)
|
.toFixed(3)
|
||||||
.replace(',', '.');
|
.replace(',', '.');
|
||||||
|
|
||||||
result.value = `${rewardSdb > 0 ? `${rewardSdb} SBD` : ''} ${
|
result.value = `${rewardSdb > 0 ? `${rewardSdb} HBD` : ''} ${
|
||||||
rewardSteem > 0 ? `${rewardSteem} STEEM` : ''
|
rewardSteem > 0 ? `${rewardSteem} HIVE` : ''
|
||||||
} ${rewardVests > 0 ? `${rewardVests} SP` : ''}`;
|
} ${rewardVests > 0 ? `${rewardVests} HP` : ''}`;
|
||||||
break;
|
break;
|
||||||
case 'transfer':
|
case 'transfer':
|
||||||
case 'transfer_to_savings':
|
case 'transfer_to_savings':
|
||||||
@ -95,7 +97,7 @@ export const groomingTransactionData = (transaction, steemPerMVests) => {
|
|||||||
opVestingShares = parseToken(opVestingShares);
|
opVestingShares = parseToken(opVestingShares);
|
||||||
result.value = `${vestsToSp(opVestingShares, steemPerMVests)
|
result.value = `${vestsToSp(opVestingShares, steemPerMVests)
|
||||||
.toFixed(3)
|
.toFixed(3)
|
||||||
.replace(',', '.')} SP`;
|
.replace(',', '.')} HP`;
|
||||||
result.icon = 'attach-money';
|
result.icon = 'attach-money';
|
||||||
result.details = acc ? `@${acc}` : null;
|
result.details = acc ? `@${acc}` : null;
|
||||||
break;
|
break;
|
||||||
@ -246,7 +248,9 @@ export const groomingPointsTransactionData = transaction => {
|
|||||||
if (!transaction) {
|
if (!transaction) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const result = { ...transaction };
|
const result = {
|
||||||
|
...transaction,
|
||||||
|
};
|
||||||
|
|
||||||
result.details = get(transaction, 'sender')
|
result.details = get(transaction, 'sender')
|
||||||
? `from @${get(transaction, 'sender')}`
|
? `from @${get(transaction, 'sender')}`
|
||||||
|
Loading…
Reference in New Issue
Block a user