Comment changes

This commit is contained in:
Mustafa Buyukcelebi 2018-12-06 23:11:15 +03:00
parent 3b68c400c2
commit 96b98169b7
2 changed files with 9 additions and 5 deletions

View File

@ -91,11 +91,15 @@ export const loginWithSC2 = async (accessToken) => {
let avatar = '';
return new Promise((resolve, reject) => {
const jsonMetadata = JSON.parse(account.account.json_metadata);
if (Object.keys(jsonMetadata).length !== 0) {
avatar = jsonMetadata.profile.profile_image;
}
try {
const jsonMetadata = JSON.parse(account.account.json_metadata);
if (Object.keys(jsonMetadata).length !== 0) {
avatar = jsonMetadata.profile.profile_image;
}
} catch (error) {
reject(new Error('Invalid credentails, please check and try again'));
}
const userData = {
username: account.account.name,
avatar,

View File

@ -1,5 +1,5 @@
export const steemConnectOptions = {
base_url: 'https://v2.steemconnect.com/oauth2/authorize',
base_url: 'https://steemconnect.com/oauth2/authorize',
client_id: 'esteem-app',
redirect_uri: 'http://127.0.0.1:3415/', // http://127.0.0.1:3415
scope: 'vote,comment,delete_comment,comment_options,custom_json,claim_reward_balance',