mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-02 11:15:35 +03:00
Fixed #463
This commit is contained in:
parent
cbe7f820d1
commit
e7c7f39ce8
@ -99,13 +99,14 @@ export const loginWithSC2 = async (code) => {
|
||||
let avatar = '';
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
let jsonMetadata;
|
||||
try {
|
||||
const jsonMetadata = JSON.parse(account.account.json_metadata);
|
||||
jsonMetadata = JSON.parse(account.account.json_metadata) || '';
|
||||
if (Object.keys(jsonMetadata).length !== 0) {
|
||||
avatar = jsonMetadata.profile.profile_image || '';
|
||||
}
|
||||
} catch (error) {
|
||||
reject(new Error('auth.invalid_credentials'));
|
||||
jsonMetadata = '';
|
||||
}
|
||||
const userData = {
|
||||
username: account.account.name,
|
||||
|
Loading…
Reference in New Issue
Block a user