Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
condenser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
condenser
Commits
7a049b1d
Commit
7a049b1d
authored
4 years ago
by
Quoc Huy Nguyen Dinh
Browse files
Options
Downloads
Patches
Plain Diff
Defaulting post_voting_power to 0 if missing from API response
parent
fb249eac
No related branches found
No related tags found
1 merge request
!109
Defaulting post_voting_power to 0 if missing from API response
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/utils/steemApi.js
+6
-2
6 additions, 2 deletions
src/app/utils/steemApi.js
with
6 additions
and
2 deletions
src/app/utils/steemApi.js
+
6
−
2
View file @
7a049b1d
import
{
api
}
from
'
@hiveio/hive-js
'
;
import
{
api
}
from
'
@hiveio/hive-js
'
;
import
_
from
'
lodash
'
;
import
{
ifHive
}
from
'
app/utils/Community
'
;
import
{
ifHive
}
from
'
app/utils/Community
'
;
import
stateCleaner
from
'
app/redux/stateCleaner
'
;
import
stateCleaner
from
'
app/redux/stateCleaner
'
;
import
{
import
{
...
@@ -28,8 +29,11 @@ export function getHivePowerForUser(account) {
...
@@ -28,8 +29,11 @@ export function getHivePowerForUser(account) {
'
database_api.find_accounts
'
,
'
database_api.find_accounts
'
,
{
accounts
:
[
account
]
}
{
accounts
:
[
account
]
}
);
);
const
post_voting_power
=
const
post_voting_power
=
_
.
get
(
fullAccounts
[
'
accounts
'
][
0
][
'
post_voting_power
'
];
fullAccounts
,
'
accounts[0].post_voting_power
'
,
0
);
/**
/**
* This magic number is coming from
* This magic number is coming from
* https://gitlab.syncad.com/hive/hivemind/-/blame/d2d5ef25107908db09438da5ee3da9d6fcb976bc/hive/server/bridge_api/objects.py
* https://gitlab.syncad.com/hive/hivemind/-/blame/d2d5ef25107908db09438da5ee3da9d6fcb976bc/hive/server/bridge_api/objects.py
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment