Skip to content
Snippets Groups Projects
Commit 296bdfff authored by Jason Salyers's avatar Jason Salyers
Browse files

Merge branch 'jes2850-more-eclipse-fixes' into 'develop'

Jes2850 more eclipse fixes

See merge request !116
parents d5a1fbca 9433f95d
No related branches found
No related tags found
2 merge requests!120Develop,!116Jes2850 more eclipse fixes
...@@ -99,9 +99,10 @@ function runApp(initial_state) { ...@@ -99,9 +99,10 @@ function runApp(initial_state) {
useAppbaseApi: !!config.steemd_use_appbase, useAppbaseApi: !!config.steemd_use_appbase,
alternative_api_endpoints: alternativeApiEndpoints, alternative_api_endpoints: alternativeApiEndpoints,
failover_threshold: config.failover_threshold, failover_threshold: config.failover_threshold,
rebranded_api: true,
}); });
steem.config.set('address_prefix', config.address_prefix); steem.config.set('address_prefix', config.address_prefix);
steem.config.set('chain_id', config.chain_id); steem.config.set('rebranded_api', true);
window.$STM_Config = config; window.$STM_Config = config;
plugins(config); plugins(config);
......
...@@ -7,23 +7,23 @@ import * as transactionActions from 'app/redux/TransactionReducer'; ...@@ -7,23 +7,23 @@ import * as transactionActions from 'app/redux/TransactionReducer';
const nothingToClaim = 'No rewards pending redemption.'; const nothingToClaim = 'No rewards pending redemption.';
const getRewardsString = account => { const getRewardsString = account => {
const reward_steem = const reward_hive =
parseFloat(account.get('reward_steem_balance').split(' ')[0]) > 0 parseFloat(account.get('reward_hive_balance').split(' ')[0]) > 0
? account.get('reward_steem_balance') ? account.get('reward_hive_balance')
: null; : null;
const reward_sbd = const reward_hbd =
parseFloat(account.get('reward_sbd_balance').split(' ')[0]) > 0 parseFloat(account.get('reward_hbd_balance').split(' ')[0]) > 0
? account.get('reward_sbd_balance') ? account.get('reward_hbd_balance')
: null; : null;
const reward_sp = const reward_hp =
parseFloat(account.get('reward_vesting_steem').split(' ')[0]) > 0 parseFloat(account.get('reward_vesting_hive').split(' ')[0]) > 0
? account.get('reward_vesting_steem').replace('STEEM', 'SP') ? account.get('reward_vesting_hive').replace('HIVE', 'HP')
: null; : null;
const rewards = []; const rewards = [];
if (reward_steem) rewards.push(reward_steem); if (reward_hive) rewards.push(reward_hive);
if (reward_sbd) rewards.push(reward_sbd); if (reward_hbd) rewards.push(reward_hbd);
if (reward_sp) rewards.push(reward_sp); if (reward_hp) rewards.push(reward_hp);
let rewards_str; let rewards_str;
switch (rewards.length) { switch (rewards.length) {
...@@ -136,8 +136,8 @@ const mapDispatchToProps = dispatch => { ...@@ -136,8 +136,8 @@ const mapDispatchToProps = dispatch => {
}; };
const operation = { const operation = {
account: username, account: username,
reward_steem: account.get('reward_steem_balance'), reward_hive: account.get('reward_hive_balance'),
reward_sbd: account.get('reward_sbd_balance'), reward_hbd: account.get('reward_hbd_balance'),
reward_vests: account.get('reward_vesting_balance'), reward_vests: account.get('reward_vesting_balance'),
}; };
......
...@@ -14,9 +14,19 @@ export async function callBridge(method, params) { ...@@ -14,9 +14,19 @@ export async function callBridge(method, params) {
params && JSON.stringify(params).substring(0, 200) params && JSON.stringify(params).substring(0, 200)
); );
if (method === "get_ranked_posts" && params && (params.observer === null || params.observer === undefined))
return new Promise(function(resolve, reject) { resolve({"result": []})});
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
api.call('bridge.' + method, params, function(err, data) { api.call('bridge.' + method, params, function(err, data) {
if (err) reject(err); if (err)
{
if (method === "get_post_header")
{
resolve({"result":[]});
}
reject(err);
}
else resolve(data); else resolve(data);
}); });
}); });
......
...@@ -25,7 +25,6 @@ global.$STM_Config = { ...@@ -25,7 +25,6 @@ global.$STM_Config = {
steemd_connection_client: config.get('steemd_connection_client'), steemd_connection_client: config.get('steemd_connection_client'),
steemd_connection_server: config.get('steemd_connection_server'), steemd_connection_server: config.get('steemd_connection_server'),
steemd_use_appbase: config.get('steemd_use_appbase'), steemd_use_appbase: config.get('steemd_use_appbase'),
chain_id: config.get('chain_id'),
address_prefix: config.get('address_prefix'), address_prefix: config.get('address_prefix'),
img_proxy_prefix: config.get('img_proxy_prefix'), img_proxy_prefix: config.get('img_proxy_prefix'),
ipfs_prefix: config.get('ipfs_prefix'), ipfs_prefix: config.get('ipfs_prefix'),
...@@ -37,6 +36,7 @@ global.$STM_Config = { ...@@ -37,6 +36,7 @@ global.$STM_Config = {
failover_threshold: config.get('failover_threshold'), failover_threshold: config.get('failover_threshold'),
alternative_api_endpoints: alternativeApiEndpoints, alternative_api_endpoints: alternativeApiEndpoints,
referral: config.get('referral'), referral: config.get('referral'),
rebranded_api: true,
}; };
const WebpackIsomorphicTools = require('webpack-isomorphic-tools'); const WebpackIsomorphicTools = require('webpack-isomorphic-tools');
...@@ -59,9 +59,10 @@ global.webpackIsomorphicTools.server(ROOT, () => { ...@@ -59,9 +59,10 @@ global.webpackIsomorphicTools.server(ROOT, () => {
useAppbaseApi: !!config.steemd_use_appbase, useAppbaseApi: !!config.steemd_use_appbase,
alternative_api_endpoints: alternativeApiEndpoints, alternative_api_endpoints: alternativeApiEndpoints,
failover_threshold: config.get('failover_threshold'), failover_threshold: config.get('failover_threshold'),
rebranded_api: true,
}); });
steem.config.set('address_prefix', config.get('address_prefix')); steem.config.set('address_prefix', config.get('address_prefix'));
steem.config.set('chain_id', config.get('chain_id')); steem.config.set('rebranded_api', true);
// const CliWalletClient = require('shared/api_client/CliWalletClient').default; // const CliWalletClient = require('shared/api_client/CliWalletClient').default;
// if (process.env.NODE_ENV === 'production') connect_promises.push(CliWalletClient.instance().connect_promise()); // if (process.env.NODE_ENV === 'production') connect_promises.push(CliWalletClient.instance().connect_promise());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment