rebranding value changes

This commit is contained in:
feruz 2020-07-18 07:44:59 +03:00
parent d3437640af
commit 0a47c9ba54
24 changed files with 120 additions and 92 deletions

View File

@ -142,7 +142,7 @@ class BoostPostScreen extends PureComponent {
this._renderDropdown(accounts, selectedUser || currentAccountName)
}
/>
<Text style={styles.balanceText}>{`${balance || _balance} ESTM`}</Text>
<Text style={styles.balanceText}>{`${balance || _balance} Points`}</Text>
<View style={styles.autocompleteLineContainer}>
<View style={styles.autocompleteLabelContainer}>
<Text style={styles.autocompleteLabelText}>
@ -189,7 +189,7 @@ class BoostPostScreen extends PureComponent {
<Text style={styles.price}>
{` $${getESTMPrice(calculatedESTM).toFixed(3)} ~ `}
</Text>
<Text style={styles.esteem}>{`${calculatedESTM} ESTM`}</Text>
<Text style={styles.esteem}>{`${calculatedESTM} Points`}</Text>
</View>
<View style={styles.quickButtonsWrapper}>

View File

@ -139,7 +139,7 @@ class PromoteView extends PureComponent {
this._renderDropdown(accounts, selectedUser || currentAccountName)
}
/>
<Text style={styles.balanceText}>{`${balance || _balance} ESTM`}</Text>
<Text style={styles.balanceText}>{`${balance || _balance} Points`}</Text>
<Fragment>
<View style={styles.autocomplateLineContainer}>
<View style={styles.autocomplateLabelContainer}>

View File

@ -67,7 +67,11 @@ const SearchModalContainer = ({
setSearchResults({ type: 'tag', data: tags });
});
} else if (text.includes('https://') || text.includes('esteem://')) {
} else if (
text.includes('https://') ||
text.includes('esteem://') ||
text.includes('ecency://')
) {
const postUrl = postUrlParser(text.replace(/\s/g, ''));
if (postUrl) {

View File

@ -69,7 +69,7 @@ const SpinGameView = ({
{!isSpinning && score > 0 && (
<View style={styles.descriptionWrapper}>
<Fragment>
<Text style={styles.description}>{`${score} ESTM`}</Text>
<Text style={styles.description}>{`${score} Points`}</Text>
<View style={styles.triangle} />
</Fragment>
</View>

View File

@ -89,7 +89,8 @@ class UpvoteContainer extends PureComponent {
const quote = get(globalProps, 'quote', 0);
const sbdPrintRate = get(globalProps, 'sbdPrintRate', 0);
const SBD_PRINT_RATE_MAX = 10000;
const percent_steem_dollars = get(content, 'percent_steem_dollars') / 20000;
const percent_steem_dollars =
get(content, 'percent_steem_dollars', content.percent_hbd) / 20000;
const pending_payout_sbd = pendingPayout * percent_steem_dollars;
const price_per_steem = base / quote;

View File

@ -21,7 +21,7 @@
"delegation": "Delegation",
"delegations": "Delegations",
"delegation_title": "Delegation reward",
"delegation_desc": "Earn ESTM everyday for delegation",
"delegation_desc": "Earn Points everyday for delegation",
"post_title": "Points for post",
"comment_title": "Points for comment",
"vote_title": "Points for vote",
@ -30,7 +30,7 @@
"checkin_title": "Points for heartbeat",
"referral": "Referral",
"referral_title": "Referral rewards",
"referral_desc": "Invite friends and earn ESTM",
"referral_desc": "Invite friends and earn Points",
"checkin_extra_title": "Usage bonus",
"no_activity": "No recent activity",
"outgoing_transfer_description": "",
@ -59,8 +59,8 @@
"to_placeholder": "Username",
"memo_placeholder": "Enter your notes here",
"transfer_token": "Transfer",
"purchase_estm": "GET ESTM",
"points": "Gift ESTM to someone",
"purchase_estm": "GET POINTS",
"points": "Gift Points to someone",
"transfer_to_saving": "To Saving",
"powerUp": "Power Up",
"withdraw_to_saving": "Withdraw Saving",
@ -82,8 +82,8 @@
"fill_transfer_from_savings": "Savings Executed",
"fill_vesting_withdraw": "PowerDown executed",
"estm": {
"title": "ESTM",
"buy": "GET ESTM"
"title": "Points",
"buy": "GET POINTS"
},
"savingsteem": {
"title": "HIVE Savings"
@ -118,7 +118,7 @@
"ignore": "ignored you",
"reblog": "reblogged",
"transfer": "transferred",
"spin": "Time to earn more ESTM",
"spin": "Time to earn more Points",
"inactive": "Be active! Write a post, continue earning",
"referral": "joined with your referral, welcome them",
"notification": "Notifications",
@ -433,9 +433,9 @@
"to_placeholder": "Username",
"memo_placeholder": "Enter your notes here",
"transfer_token": "Transfer",
"purchase_estm": "Purchase ESTM",
"purchase_estm": "Purchase Points",
"convert": "Convert HBD to HIVE",
"points": "Gift ESTM to someone",
"points": "Gift Points to someone",
"transfer_to_saving": "Transfer To Saving",
"powerUp": "Power Up",
"withdraw_to_saving": "Withdraw To Saving",
@ -458,7 +458,7 @@
},
"boost": {
"title": "Get Points",
"buy": "GET ESTM",
"buy": "GET Points",
"next": "NEXT",
"account": {
"title": "Get Account Boost",
@ -466,7 +466,7 @@
}
},
"free_estm": {
"title": "Free ESTM",
"title": "Free Points",
"button": "SPIN & WIN",
"get_spin": "5 SPINS",
"spin_right": "Spin Left",

View File

@ -59,8 +59,8 @@
"to_placeholder": "Ім'я користувача",
"memo_placeholder": "Введіть сюди свої примітки",
"transfer_token": "Переказ",
"purchase_estm": "Отримати ESTM",
"points": "Подарувати комусь ESTM",
"purchase_estm": "Отримати Points",
"points": "Подарувати комусь Points",
"transfer_to_saving": "В заощадження",
"powerUp": "Збільшення Силу Голосу",
"withdraw_to_saving": "Вивести заощадження",

View File

@ -59,8 +59,8 @@
"to_placeholder": "Tên người dùng",
"memo_placeholder": "Nhập ghi chú của bạn vào đây",
"transfer_token": "Chuyển cho",
"purchase_estm": "ĐƯỢC ESTM",
"points": "Gift ESTM to someone",
"purchase_estm": "ĐƯỢC POINTS",
"points": "Gift Points to someone",
"transfer_to_saving": "To Saving",
"powerUp": "Tăng lên",
"withdraw_to_saving": "Withdraw Saving",
@ -82,8 +82,8 @@
"fill_transfer_from_savings": "Savings Executed",
"fill_vesting_withdraw": "PowerDown executed",
"estm": {
"title": "ESTM",
"buy": "ĐƯỢC ESTM"
"title": "Points",
"buy": "ĐƯỢC POINTS"
},
"savingsteem": {
"title": "HIVE Savings"

View File

@ -59,8 +59,8 @@
"to_placeholder": "Oruko olumulo",
"memo_placeholder": "Enter your notes here",
"transfer_token": "Fi ranse",
"purchase_estm": "GET ESTM",
"points": "Gift ESTM to someone",
"purchase_estm": "GET POINTS",
"points": "Gift Points to someone",
"transfer_to_saving": "To Saving",
"powerUp": "Power Up",
"withdraw_to_saving": "Withdraw Saving",
@ -82,8 +82,8 @@
"fill_transfer_from_savings": "Savings Executed",
"fill_vesting_withdraw": "PowerDown executed",
"estm": {
"title": "ESTM",
"buy": "GET ESTM"
"title": "Points",
"buy": "GET POINTS"
},
"savingsteem": {
"title": "HIVE Savings"
@ -422,7 +422,7 @@
"transfer_token": "Transfer",
"purchase_estm": "Purchase ESTM",
"convert": "Convert HBD to HIVE",
"points": "Gift ESTM to someone",
"points": "Gift Points to someone",
"transfer_to_saving": "Transfer To Saving",
"powerUp": "Power Up",
"withdraw_to_saving": "Withdraw To Saving",

View File

@ -5,9 +5,9 @@
"comment_benefactor_reward": "受益者奖励",
"claim_reward_balance": "领取奖励 ",
"transfer": "转账",
"transfer_to_vesting": "转为 Steem Power(SP)",
"transfer_to_vesting": "转为 Hive Power(SP)",
"transfer_from_savings": "储蓄转出",
"withdraw_vesting": "释放 Steem Power",
"withdraw_vesting": "释放 Hive Power",
"fill_order": "成交订单",
"post": "文章",
"comment": "评论",
@ -59,15 +59,15 @@
"to_placeholder": "用户名",
"memo_placeholder": "在此输入您的备注",
"transfer_token": "转账",
"purchase_estm": "获取 ESTM",
"points": "向他人赠送 Ecency 点数(ESTM)",
"purchase_estm": "获取 Points",
"points": "向他人赠送 Ecency 点数(Points)",
"transfer_to_saving": "转为储蓄",
"powerUp": "转为 Steem Power",
"powerUp": "转为 Hive Power",
"withdraw_to_saving": "提现到储蓄",
"steemconnect_title": "Hivesigner Transfer",
"next": "下一个",
"delegate": "委托",
"power_down": "释放 Steem Power",
"power_down": "释放 Hive Power",
"withdraw_steem": "Withdraw HIVE",
"withdraw_sbd": "Withdraw HBD",
"transfer_to_savings": "转为储蓄",
@ -80,10 +80,10 @@
"delegate_vesting_shares": "委托",
"fill_convert_request": "转换已执行",
"fill_transfer_from_savings": "储蓄已执行",
"fill_vesting_withdraw": "释放 Steem Power 已执行",
"fill_vesting_withdraw": "释放 Hive Power 已执行",
"estm": {
"title": "ESTM",
"buy": "获取 ESTM"
"title": "Points",
"buy": "获取 POINTS"
},
"savingsteem": {
"title": "HIVE Savings"
@ -162,7 +162,7 @@
"havent_commented": "还没有任何评论",
"havent_posted": "还没有发布任何内容",
"steem_power": "Hive Power",
"next_power_text": "下一次 释放 Steem Power 是在",
"next_power_text": "下一次 释放 Hive Power 是在",
"days": "天",
"day": "天",
"steem_dollars": "Hive Dollars",
@ -420,23 +420,23 @@
"to_placeholder": "用户名",
"memo_placeholder": "在此输入您的备注",
"transfer_token": "转账",
"purchase_estm": "Purchase ESTM",
"purchase_estm": "Purchase Points",
"convert": "Convert HBD to HIVE",
"points": "向他人赠送 Ecency 点数(ESTM)",
"points": "向他人赠送 Ecency 点数(Points)",
"transfer_to_saving": "转入储蓄",
"powerUp": "转为 Steem Power",
"powerUp": "转为 Hive Power",
"withdraw_to_saving": "提现到储蓄",
"steemconnect_title": "Hivesigner Transfer",
"estimated_weekly": "每周估计",
"destination_accounts": "目标帐户",
"stop_information": "您确定要停止吗?",
"percent": "百分比",
"auto_vests": "自动转 Steem Power(SP)",
"auto_vests": "自动转 Hive Power(SP)",
"save": "储蓄",
"percent_information": "百分比信息",
"next": "下一个",
"delegate": "委托",
"power_down": "释放 Steem Power",
"power_down": "释放 Hive Power",
"withdraw_steem": "Withdraw HIVE",
"withdraw_sbd": "Withdraw HIVE Dollar",
"incoming_funds": "转入资金",

View File

@ -5,9 +5,9 @@
"comment_benefactor_reward": "受益者獎勵",
"claim_reward_balance": "領取獎勵",
"transfer": "轉賬",
"transfer_to_vesting": "轉為 Steem Power(SP)",
"transfer_to_vesting": "轉為 Hive Power(HP)",
"transfer_from_savings": "儲蓄轉出",
"withdraw_vesting": "釋放 Steem Power",
"withdraw_vesting": "釋放 Hive Power",
"fill_order": "成交訂單",
"post": "文章",
"comment": "評論",
@ -62,12 +62,12 @@
"purchase_estm": "獲取 ESTM",
"points": "向他人贈送Ecency點數ESTM",
"transfer_to_saving": "轉為儲蓄",
"powerUp": "轉為Steem Power",
"powerUp": "轉為Hive Power",
"withdraw_to_saving": "提現到儲蓄",
"steemconnect_title": "Hivesigner Transfer",
"next": "下一个",
"delegate": "委託",
"power_down": "釋放 Steem Power",
"power_down": "釋放 Hive Power",
"withdraw_steem": "Withdraw HIVE",
"withdraw_sbd": "Withdraw HBD",
"transfer_to_savings": "轉為儲蓄",
@ -80,10 +80,10 @@
"delegate_vesting_shares": "委託",
"fill_convert_request": "轉換已執行",
"fill_transfer_from_savings": "儲蓄已執行",
"fill_vesting_withdraw": "釋放Steem Power已執行",
"fill_vesting_withdraw": "釋放Hive Power已執行",
"estm": {
"title": "ESTM",
"buy": "獲取 ESTM"
"title": "Points",
"buy": "獲取 POINTS"
},
"savingsteem": {
"title": "HIVE Savings"
@ -162,7 +162,7 @@
"havent_commented": "還沒有任何評論",
"havent_posted": "還沒發佈任何內容",
"steem_power": "Hive Power",
"next_power_text": "下一次釋放Steem Power是在",
"next_power_text": "下一次釋放Hive Power是在",
"days": "天",
"day": "天",
"steem_dollars": "Hive Dollars",
@ -420,9 +420,9 @@
"to_placeholder": "用戶名",
"memo_placeholder": "在此輸入您的備註",
"transfer_token": "轉帳",
"purchase_estm": "Purchase ESTM",
"purchase_estm": "Purchase Points",
"convert": "Convert HBD to HIVE",
"points": "向他人贈送Ecency點數ESTM",
"points": "向他人贈送Ecency點數Points",
"transfer_to_saving": "轉入儲蓄",
"powerUp": "轉為Steem Power",
"withdraw_to_saving": "提現到儲蓄",
@ -431,12 +431,12 @@
"destination_accounts": "目標帳戶",
"stop_information": "您確定要停止嗎?",
"percent": "百分比",
"auto_vests": "自動轉 Steem Power(SP)",
"auto_vests": "自動轉 Hive Power(HP)",
"save": "儲蓄",
"percent_information": "百分比資訊",
"next": "下一个",
"delegate": "委託",
"power_down": "釋放Steem Power",
"power_down": "Hive Power",
"withdraw_steem": "Withdraw HIVE",
"withdraw_sbd": "Withdraw HIVE Dollar",
"incoming_funds": "轉入資金",

View File

@ -1,3 +1,3 @@
export default ['rpc.esteem.app', 'api.hive.blog', 'anyx.io', 'api.hivekings.com'];
export default ['rpc.esteem.app', 'api.hive.blog', 'anyx.io', 'api.pharesim.me'];
export const VALUE = ['rpc.esteem.app', 'api.hive.blog', 'anyx.io', 'api.hivekings.com'];
export const VALUE = ['rpc.esteem.app', 'api.hive.blog', 'anyx.io', 'api.pharesim.me'];

View File

@ -1,6 +1,6 @@
export const steemConnectOptions = {
base_url: 'https://hivesigner.com/',
client_id: 'esteemapp',
client_id: 'ecency.app',
redirect_uri: 'http://127.0.0.1:3415/',
scope:
'vote,comment,delete_comment,comment_options,custom_json,claim_reward_balance,account_update,offline',

View File

@ -152,7 +152,7 @@ class InAppPurchaseContainer extends Component {
render() {
const { children, isNoSpin } = this.props;
const { productList, isLoading, isProcessing } = this.state;
const FREE_ESTM = { productId: 'freePoints', title: 'free estm' };
const FREE_ESTM = { productId: 'freePoints', title: 'free points' };
const _productList = isNoSpin
? productList
: [...productList.filter((item) => !item.productId.includes('spins')), FREE_ESTM];

View File

@ -160,9 +160,9 @@ const WalletContainer = ({
const _isHasUnclaimedRewards = (account) => {
return (
parseToken(get(account, 'reward_steem_balance')) > 0 ||
parseToken(get(account, 'reward_sbd_balance')) > 0 ||
parseToken(get(account, 'reward_vesting_steem')) > 0
parseToken(get(account, 'reward_steem_balance', account.reward_hive_balance)) > 0 ||
parseToken(get(account, 'reward_sbd_balance', account.reward_hbd_balance)) > 0 ||
parseToken(get(account, 'reward_vesting_steem', account.reward_vesting_hive)) > 0
);
};
@ -180,8 +180,8 @@ const WalletContainer = ({
isHasUnclaimedRewards = _isHasUnclaimedRewards(account[0]);
if (isHasUnclaimedRewards) {
const {
reward_steem_balance: steemBal,
reward_sbd_balance: sbdBal,
reward_steem_balance: steemBal = account[0].reward_hive_balance,
reward_sbd_balance: sbdBal = account[0].reward_hbd_balance,
reward_vesting_balance: vestingBal,
} = account[0];
return claimRewardBalance(currentAccount, pinCode, steemBal, sbdBal, vestingBal);
@ -256,10 +256,16 @@ const WalletContainer = ({
) {
balance = Math.round(walletData.sbdBalance * 1000) / 1000;
}
if (transferType === 'withdraw_steem' && fundType === 'HIVE') {
if (
(transferType === 'withdraw_steem' || transferType === 'withdraw_hive') &&
fundType === 'HIVE'
) {
balance = Math.round(walletData.savingBalance * 1000) / 1000;
}
if (transferType === 'withdraw_sbd' && fundType === 'HBD') {
if (
(transferType === 'withdraw_sbd' || transferType === 'withdraw_hbd') &&
fundType === 'HBD'
) {
balance = Math.round(walletData.savingBalanceSbd * 1000) / 1000;
}

View File

@ -159,11 +159,11 @@ class TransferContainer extends Component {
case 'powerUp':
func = transferToVesting;
break;
case 'withdraw_steem':
case 'withdraw_steem' || 'withdraw_hive':
func = transferFromSavings;
data.requestId = new Date().getTime() >>> 0;
break;
case 'withdraw_sbd':
case 'withdraw_sbd' || 'withdraw_hbd':
func = transferFromSavings;
data.requestId = new Date().getTime() >>> 0;
break;

View File

@ -111,7 +111,7 @@ export const addBookmark = (username, author, permlink) =>
username,
author,
permlink,
chain: 'steem',
chain: 'hive',
})
.then((resp) => resp.data);
@ -312,7 +312,7 @@ export const schedule = (
post_type: operationType,
upvote_this: upvote,
schedule: scheduleDate,
chain: 'steem',
chain: 'hive',
})
.then((resp) => resp.data);

View File

@ -81,10 +81,12 @@ export const fetchGlobalProps = async () => {
}
const steemPerMVests =
(parseToken(get(globalDynamic, 'total_vesting_fund_steem')) /
(parseToken(
get(globalDynamic, 'total_vesting_fund_steem', globalDynamic.total_vesting_fund_hive),
) /
parseToken(get(globalDynamic, 'total_vesting_shares'))) *
1e6;
const sbdPrintRate = get(globalDynamic, 'sbd_print_rate');
const sbdPrintRate = get(globalDynamic, 'sbd_print_rate', globalDynamic.hbd_print_rate);
const base = parseToken(get(feedHistory, 'current_median_history.base'));
const quote = parseToken(get(feedHistory, 'current_median_history.quote'));
const fundRecentClaims = get(rewardFund, 'recent_claims');
@ -165,17 +167,17 @@ export const getUser = async (user) => {
_account.steem_power = await vestToSteem(
_account.vesting_shares,
globalProperties.total_vesting_shares,
globalProperties.total_vesting_fund_steem,
globalProperties.total_vesting_fund_steem || globalProperties.total_vesting_fund_hive,
);
_account.received_steem_power = await vestToSteem(
get(_account, 'received_vesting_shares'),
get(globalProperties, 'total_vesting_shares'),
get(globalProperties, 'total_vesting_fund_steem'),
get(globalProperties, 'total_vesting_fund_steem', globalProperties.total_vesting_fund_hive),
);
_account.delegated_steem_power = await vestToSteem(
get(_account, 'delegated_vesting_shares'),
get(globalProperties, 'total_vesting_shares'),
get(globalProperties, 'total_vesting_fund_steem'),
get(globalProperties, 'total_vesting_fund_steem', globalProperties.total_vesting_fund_hive),
);
if (has(_account, 'posting_json_metadata') || has(_account, 'json_metadata')) {
@ -1287,6 +1289,8 @@ export const claimRewardBalance = (account, pinCode, rewardSteem, rewardSbd, rew
{
account: account.name,
reward_steem: rewardSteem,
reward_hive: rewardSteem,
reward_hbd: rewardSbd,
reward_sbd: rewardSbd,
reward_vests: rewardVests,
},
@ -1399,7 +1403,7 @@ export const grantPostingPermission = async (json, pin, currentAccount) => {
{
account_auths: [
...get(currentAccount, 'posting.account_auths'),
['esteemapp', get(currentAccount, 'posting.weight_threshold')],
['ecency', get(currentAccount, 'posting.weight_threshold')],
],
},
);

View File

@ -83,14 +83,15 @@ export const prepareBeneficiaries = (postObj) => {
allow_curation_rewards: true,
max_accepted_payout: '1000000.000 HBD',
percent_steem_dollars: '10000',
percent_hbd: '10000',
extensions: [
[
0,
{
beneficiaries: [
{
account: 'esteemapp',
weight: 300, // 3%
account: 'ecency',
weight: 100, // 1%
},
],
},

View File

@ -1,7 +1,7 @@
import hivesigner from 'hivesigner';
const api = new hivesigner.Client({
app: 'esteemapp',
app: 'ecency',
callbackURL: 'http://127.0.0.1:3415',
});

View File

@ -19,8 +19,8 @@ const ITEM_SKUS = Platform.select({
const _getTitle = (title) => {
let _title = title.toUpperCase();
if (_title !== 'FREE ESTM') {
_title = _title.replace(/[^0-9]+/g, '') + ' ESTM';
if (_title !== 'FREE POINTS') {
_title = _title.replace(/[^0-9]+/g, '') + ' POINTS';
}
return _title;

View File

@ -292,7 +292,7 @@ class EditorContainer extends Component {
const _tags = fields.tags.filter((tag) => tag && tag !== ' ');
const jsonMeta = makeJsonMetadata(meta, _tags);
// TODO: check if permlink is available github: #314 https://github.com/esteemapp/esteem-mobile/pull/314
// TODO: check if permlink is available github: #314 https://github.com/ecency/ecency-mobile/pull/314
let permlink = generatePermlink(fields.title);
let dublicatePost;
@ -379,7 +379,7 @@ class EditorContainer extends Component {
const { post } = this.state;
const jsonMeta = makeJsonMetadataReply(post.json_metadata.tags || ['esteem']);
const jsonMeta = makeJsonMetadataReply(post.json_metadata.tags || ['ecency']);
const permlink = generateReplyPermlink(post.author);
const author = currentAccount.name;
const options = makeOptions(author, permlink);
@ -562,7 +562,7 @@ class EditorContainer extends Component {
if (currentAccount && currentAccount.posting) {
hasPostingPerm =
currentAccount.posting.account_auths.filter((x) => x[0] === 'esteemapp').length > 0;
currentAccount.posting.account_auths.filter((x) => x[0] === 'ecency').length > 0;
}
if (hasPostingPerm) {

View File

@ -69,6 +69,7 @@ export const makeOptions = (author, permlink, operationType) => {
permlink,
max_accepted_payout: '1000000.000 HBD',
percent_steem_dollars: 10000,
percent_hbd: 10000,
extensions: [[0, { beneficiaries: [{ account: 'ecency', weight: 100 }] }]],
};
@ -76,16 +77,19 @@ export const makeOptions = (author, permlink, operationType) => {
case 'sp':
a.max_accepted_payout = '1000000.000 HBD';
a.percent_steem_dollars = 0;
a.percent_hbd = 0;
break;
case 'dp':
a.max_accepted_payout = '0.000 HBD';
a.percent_steem_dollars = 10000;
a.percent_hbd = 10000;
break;
default:
a.max_accepted_payout = '1000000.000 HBD';
a.percent_steem_dollars = 10000;
a.percent_hbd = 10000;
break;
}

View File

@ -36,8 +36,8 @@ export const groomingTransactionData = (transaction, steemPerMVests) => {
case 'author_reward':
case 'comment_benefactor_reward':
let {
sbd_payout: sbdPayout,
steem_payout: steemPayout,
sbd_payout: sbdPayout = opData.hbd_payout,
steem_payout: steemPayout = opData.hive_payout,
vesting_payout: vestingPayout,
} = opData;
@ -165,9 +165,15 @@ export const groomingWalletData = async (user, globalProps, userCurrency) => {
const userdata = get(accounts, get(user, 'name'), '');
// TODO: move them to utils these so big for a lifecycle function
walletData.rewardSteemBalance = parseToken(userdata.reward_steem_balance);
walletData.rewardSbdBalance = parseToken(userdata.reward_sbd_balance);
walletData.rewardVestingSteem = parseToken(userdata.reward_vesting_steem);
walletData.rewardSteemBalance = parseToken(
userdata.reward_hive_balance || userdata.reward_steem_balance,
);
walletData.rewardSbdBalance = parseToken(
userdata.reward_hbd_balance || userdata.reward_sbd_balance,
);
walletData.rewardVestingSteem = parseToken(
userdata.reward_vesting_hive || userdata.reward_vesting_steem,
);
walletData.hasUnclaimedRewards =
walletData.rewardSteemBalance > 0 ||
walletData.rewardSbdBalance > 0 ||
@ -178,9 +184,11 @@ export const groomingWalletData = async (user, globalProps, userCurrency) => {
walletData.vestingSharesReceived = parseToken(userdata.received_vesting_shares);
walletData.vestingSharesTotal =
walletData.vestingShares - walletData.vestingSharesDelegated + walletData.vestingSharesReceived;
walletData.sbdBalance = parseToken(userdata.sbd_balance);
walletData.sbdBalance = parseToken(userdata.hbd_balance || userdata.sbd_balance);
walletData.savingBalance = parseToken(userdata.savings_balance);
walletData.savingBalanceSbd = parseToken(userdata.savings_sbd_balance);
walletData.savingBalanceSbd = parseToken(
userdata.savings_hbd_balance || userdata.savings_sbd_balance,
);
const feedHistory = await getFeedHistory();
const base = parseToken(feedHistory.current_median_history.base);
@ -246,7 +254,7 @@ export const groomingPointsTransactionData = (transaction) => {
? `from @${get(transaction, 'sender')}`
: get(transaction, 'receiver') && `to @${get(transaction, 'receiver')}`;
result.value = `${get(transaction, 'amount')} ESTM`;
result.value = `${get(transaction, 'amount')} Points`;
return result;
};