mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-20 20:01:56 +03:00
use only posting_json_metadata or nothing
This commit is contained in:
parent
b9e5df0373
commit
dac97c550e
@ -64,8 +64,7 @@ export const login = async (username, password, isPinCodeOpen) => {
|
||||
|
||||
let jsonMetadata;
|
||||
try {
|
||||
jsonMetadata =
|
||||
JSON.parse(account.posting_json_metadata) || JSON.parse(account.json_metadata) || '';
|
||||
jsonMetadata = JSON.parse(account.posting_json_metadata) || '';
|
||||
} catch (err) {
|
||||
jsonMetadata = '';
|
||||
}
|
||||
@ -124,8 +123,7 @@ export const loginWithSC2 = async (code, isPinCodeOpen) => {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
let jsonMetadata;
|
||||
try {
|
||||
jsonMetadata =
|
||||
JSON.parse(account.posting_json_metadata) || JSON.parse(account.json_metadata) || '';
|
||||
jsonMetadata = JSON.parse(account.posting_json_metadata) || '';
|
||||
if (Object.keys(jsonMetadata).length !== 0) {
|
||||
avatar = jsonMetadata.profile.profile_image || '';
|
||||
}
|
||||
|
@ -201,11 +201,9 @@ export const getUser = async (user) => {
|
||||
get(globalProperties, 'total_vesting_fund_steem', globalProperties.total_vesting_fund_hive),
|
||||
);
|
||||
|
||||
if (has(_account, 'posting_json_metadata') || has(_account, 'json_metadata')) {
|
||||
if (has(_account, 'posting_json_metadata')) {
|
||||
try {
|
||||
_account.about =
|
||||
JSON.parse(get(_account, 'posting_json_metadata')) ||
|
||||
JSON.parse(get(_account, 'json_metadata'));
|
||||
_account.about = JSON.parse(get(_account, 'posting_json_metadata'));
|
||||
} catch (e) {
|
||||
//alert(e);
|
||||
_account.about = {};
|
||||
|
Loading…
Reference in New Issue
Block a user