mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-02 11:15:35 +03:00
fixed profile bug changed endpoint for desteem
This commit is contained in:
parent
d474e20bf2
commit
ba857865f5
@ -155,27 +155,10 @@ export const vestToSteem = async (vestingShares, totalVestingShares, totalVestin
|
||||
* (parseFloat(vestingShares) / parseFloat(totalVestingShares))
|
||||
).toFixed(0);
|
||||
|
||||
/**
|
||||
* @method getFollows get account data
|
||||
* @param user username
|
||||
*/
|
||||
export const getFollows = user => new Promise((resolve, reject) => {
|
||||
client
|
||||
.call('follow_api', 'get_follow_count', [user])
|
||||
.then((result) => {
|
||||
resolve(result);
|
||||
})
|
||||
.catch((err) => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
export const getFollows = username => client.database.call('get_follow_count', [username]);
|
||||
|
||||
/**
|
||||
* @method getFollowing
|
||||
* @param user username
|
||||
* TODO: Pagination
|
||||
*/
|
||||
export const getFollowing = (follower, startFollowing, followType = 'blog', limit = 100) => client.database.call('get_following', [follower, startFollowing, followType, limit]);
|
||||
|
||||
export const getFollowers = (follower, startFollowing, followType = 'blog', limit = 100) => client.database.call('get_followers', [follower, startFollowing, followType, limit]);
|
||||
|
||||
export const getIsFollowing = (user, author) => new Promise((resolve, reject) => {
|
||||
|
@ -216,9 +216,11 @@ class ProfileContainer extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
await getFollows(username).then((res) => {
|
||||
follows = res;
|
||||
});
|
||||
try {
|
||||
follows = await getFollows(username);
|
||||
} catch (err) {
|
||||
follows = null;
|
||||
}
|
||||
|
||||
this.setState({
|
||||
follows,
|
||||
|
Loading…
Reference in New Issue
Block a user