added again for steemconnect logic

This commit is contained in:
ue 2019-09-10 21:43:48 +03:00
parent ea786a0ce4
commit 21894227f5

View File

@ -1169,7 +1169,20 @@ export const profileUpdate = async (params, pin, currentAccount) => {
const key = getActiveKey(get(currentAccount, 'local'), digitPinCode);
if (get(currentAccount, 'local.authType') === AUTH_TYPE.STEEM_CONNECT) {
return Promise.reject(new Error('Steem connect profile update not implemented yet.'));
const token = decryptKey(get(currentAccount, 'local.accessToken'), digitPinCode);
const api = steemConnect.Initialize({
accessToken: token,
});
const _params = {
account: get(currentAccount, 'name'),
memo_key: get(currentAccount, 'memo_key'),
json_metadata: jsonStringify(params),
};
const opArray = [['account_update', _params]];
return api.broadcast(opArray).then(resp => resp.result);
}
if (key) {