Commit 1563c68a authored by Evan's avatar Evan
Browse files

update steemjs version, consolidate pricePerSteem computations

parent da4e5550
......@@ -24,7 +24,7 @@
"license": "MIT",
"dependencies": {
"@steem/crypto-session": "git+https://github.com/steemit/crypto-session.git#83a90b319ce5bc6a70362d52a15a815de7e729bb",
"@steemit/steem-js": "0.7.1",
"@steemit/steem-js": "0.7.3",
"assert": "1.4.1",
"autoprefixer-loader": "3.2.0",
"babel-cli": "6.26.0",
......
......@@ -4,6 +4,7 @@ import { parsePayoutAmount, repLog10 } from 'app/utils/ParsersAndFormatters';
import { Long } from 'bytebuffer';
import { VEST_TICKER, LIQUID_TICKER } from 'app/client_config';
import { fromJS } from 'immutable';
import { formatter } from '@steemit/steem-js';
export const numberWithCommas = x => x.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
......@@ -203,11 +204,7 @@ export function pricePerSteem(state) {
state.global.get('feed_price')
);
if (feed_price && feed_price.has('base') && feed_price.has('quote')) {
const { base, quote } = feed_price.toJS();
if (/ SBD$/.test(base) && / STEEM$/.test(quote))
return (
parseFloat(base.split(' ')[0]) / parseFloat(quote.split(' ')[0])
);
return formatter.pricePerSteem(feed_price.toJS());
}
return undefined;
}
......@@ -28,9 +28,9 @@
dependencies:
"@steemit/libcrypto" "^1.0.1"
"@steemit/steem-js@0.7.1":
version "0.7.1"
resolved "https://registry.yarnpkg.com/@steemit/steem-js/-/steem-js-0.7.1.tgz#9e9ead34ce9438513ad49e8f7d4d48d32d9c3c39"
"@steemit/steem-js@0.7.3":
version "0.7.3"
resolved "https://registry.yarnpkg.com/@steemit/steem-js/-/steem-js-0.7.3.tgz#f7a3a780264e4cf90a397ff2aeec949f9e5d24e2"
dependencies:
"@steemit/rpc-auth" "^1.1.0"
bigi "^1.4.2"
......@@ -4236,7 +4236,7 @@ hide-powered-by@1.0.0:
resolved "https://registry.yarnpkg.com/hide-powered-by/-/hide-powered-by-1.0.0.tgz#4a85ad65881f62857fc70af7174a1184dccce32b"
highcharts@4.2.7, highcharts@^4.2.3:
version v4.2.7
version "4.2.7"
resolved "https://registry.yarnpkg.com/highcharts/-/highcharts-4.2.7.tgz#45cbed8e99c9c042e95f9c51076726496f686862"
history@^3.0.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