Commit c6d31a0b authored by Jason Salyers's avatar Jason Salyers

Merge branch 'develop' into 'master'

Develop

See merge request !71
parents 268a4d23 32574917
......@@ -41,7 +41,7 @@
"testURL": "http://localhost/"
},
"dependencies": {
"@hiveio/hive-js": "0.8.7",
"@hiveio/hive-js": "0.8.8",
"@steem/crypto-session": "git+https://github.com/steemit/crypto-session.git#83a90b319ce5bc6a70362d52a15a815de7e729bb",
"assert": "1.4.1",
"autoprefixer-loader": "3.2.0",
......
......@@ -55,6 +55,29 @@ async function getStateForWitnesses() {
return result;
}
async function getGenericState(user) {
let result = {};
result.accounts = {};
result.content = {};
result.props = await api.getDynamicGlobalPropertiesAsync();
let user_to_check = user;
//user should be an account
if (user.startsWith('/')) {
user_to_check = user.split('/')[1];
}
if (user_to_check.startsWith('@'))
user_to_check = user_to_check.split('@')[1];
let account_details = await api.getAccountsAsync([user_to_check]);
result.accounts[user_to_check] = account_details[0];
result.feed_price = {};
let feed_data = await api.getFeedHistoryAsync();
result.feed_price = feed_data.current_median_history;
return result;
}
export async function getStateAsync(url) {
// strip off query string
if (url === 'trending') {
......@@ -81,7 +104,7 @@ export async function getStateAsync(url) {
}
}
}
let raw = await api.getStateAsync(path);
let raw = await getGenericState(path);
if (fetch_transfers) {
let account_name = path.split('@')[1];
......
......@@ -132,10 +132,10 @@
lodash "^4.17.13"
to-fast-properties "^2.0.0"
"@hiveio/hive-js@0.8.7":
version "0.8.7"
resolved "https://registry.yarnpkg.com/@hiveio/hive-js/-/hive-js-0.8.7.tgz#2f85cdc25f3e7903d3c8ae2a268628eadf1efecd"
integrity sha512-bWJ2lyTXw/pkzkCi+Q+QPt3S5rOnmHj+ORNfdfVLdmau0lNf8xWRRQupC/+wy3lfioIHPcQ+5FsLNFqGV4KGdA==
"@hiveio/hive-js@0.8.8":
version "0.8.8"
resolved "https://registry.yarnpkg.com/@hiveio/hive-js/-/hive-js-0.8.8.tgz#4880ceabb9e1d7580d8f48a4ed2825076f79cda9"
integrity sha512-xFgSfrAhlrm/K9QMpQ47bOfSg21/tWJQzEVSZl8eWfgqnWtTsQolyMvBNZNzrbRa6118Ewsm2APDbwTfs6Q34g==
dependencies:
"@steemit/rpc-auth" "^1.1.1"
bigi "^1.4.2"
......
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