Commit 9c6f75b7 authored by roadscape's avatar roadscape

handle gprops fail

parent 09e5463e
......@@ -114,9 +114,7 @@ class UserWallet extends React.Component {
.split(' ')
.shift();
return (
virtualSupply *
currentInflationRate *
vestingRewardPercent /
(virtualSupply * currentInflationRate * vestingRewardPercent) /
totalVestingFunds
);
};
......@@ -541,7 +539,11 @@ class UserWallet extends React.Component {
);
}
const spApr = this.getCurrentApr(gprops);
let spApr;
try {
// TODO: occasionally fails. grops not loaded yet?
spApr = this.getCurrentApr(gprops);
} catch (e) {}
return (
<div className="UserWallet">
......@@ -620,11 +622,13 @@ class UserWallet extends React.Component {
)}
</span>
) : null}
<FormattedHTMLMessage
className="secondary"
id="tips_js.steem_power_apr"
params={{ value: spApr.toFixed(2) }}
/>{' '}
{spApr && (
<FormattedHTMLMessage
className="secondary"
id="tips_js.steem_power_apr"
params={{ value: spApr.toFixed(2) }}
/>
)}{' '}
</div>
<div className="column small-12 medium-4">
{isMyAccount ? (
......
......@@ -43,6 +43,7 @@ export function serverApiRecordEvent(type, val, rate_limit_ms = 5000) {
let last_page, last_views, last_page_promise;
export function recordPageView(page, referer, account) {
return; // TODO: disabled until overseer update
if (last_page_promise && page === last_page) return last_page_promise;
if (!process.env.BROWSER) return Promise.resolve(0);
......
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