Commit d8d39354 authored by Quoc Huy Nguyen Dinh's avatar Quoc Huy Nguyen Dinh
Browse files

Closes #25: added HBD interest rate to user wallet

parent bf9206ba
......@@ -80,7 +80,7 @@ a, path, circle {
@include themify($themes) {
color: themed('textColorSecondary');
}
:hover {
&:hover {
@include themify($themes) {
color: themed('textColorAccent');
}
......
......@@ -101,7 +101,7 @@ class UserWallet extends React.Component {
this.props.claimRewards(account);
};
getCurrentApr = (gprops) => {
getCurrentHpApr = (gprops) => {
// The inflation was set to 9.5% at block 7m
const initialInflationRate = 9.5;
const initialBlock = 7000000;
......@@ -563,7 +563,7 @@ class UserWallet extends React.Component {
let hpApr;
try {
// TODO: occasionally fails. grops not loaded yet?
hpApr = this.getCurrentApr(gprops);
hpApr = this.getCurrentHpApr(gprops);
} catch (e) {}
return (
......@@ -681,6 +681,15 @@ class UserWallet extends React.Component {
<div className="column small-12 medium-8">
HIVE DOLLARS
<div className="secondary">{hbdMessage}</div>
<FormattedHTMLMessage
className="secondary"
id="tips_js.hbd_interest_rate"
params={{
value: (gprops.hbd_interest_rate / 100).toFixed(
2
),
}}
/>
</div>
<div className="column small-12 medium-4">
{isMyAccount ? (
......@@ -720,6 +729,17 @@ class UserWallet extends React.Component {
'transfer_jsx.balance_subject_to_3_day_withdraw_waiting_period'
)}
</span>
<span>
<FormattedHTMLMessage
className="secondary"
id="tips_js.hbd_interest_rate"
params={{
value: (
gprops.hbd_interest_rate / 100
).toFixed(2),
}}
/>
</span>
</div>
</div>
<div className="column small-12 medium-4">
......
......@@ -492,7 +492,8 @@
"non_transferable": "%(VESTING_TOKEN)s is non-transferable and requires 3 months (13 payments) to convert back to %(LIQUID_TOKEN)s.",
"converted_VESTING_TOKEN_can_be_sent_to_yourself_but_can_not_transfer_again": "Converted %(VESTING_TOKEN)s can be sent to yourself or someone else but can not transfer again without converting back to %(LIQUID_TOKEN)s.",
"part_of_your_hive_power_is_currently_delegated": "Part of %(user_name)s's HIVE POWER is currently delegated. Delegation is donated for influence or to help new users perform actions on Hive. Your delegation amount can fluctuate.",
"hive_power_apr": "HIVE POWER increases at an APR of approximately %(value)s&#37;, subject to blockchain variance. <a href=\"/faq.html#How_many_new_tokens_are_generated_by_the_blockchain\">See FAQ for details</a>."
"hive_power_apr": "HIVE POWER increases at an APR of approximately %(value)s&#37;, subject to blockchain variance. <a href=\"/faq.html#How_many_new_tokens_are_generated_by_the_blockchain\">See FAQ for details</a>.",
"hbd_interest_rate": "HBD interest rate: %(value)s&#37; APR (as voted by the <a href=\"/~witnesses\" target=\"_blank\" ref=\"noopener\">Witnesses</a>)"
},
"promote_post_jsx": {
"promote_post": "Promote Post",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment