From 21894227f576b2556cfa3035c0000949ec44b1f2 Mon Sep 17 00:00:00 2001 From: ue Date: Tue, 10 Sep 2019 21:43:48 +0300 Subject: [PATCH] added again for steemconnect logic --- src/providers/steem/dsteem.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/providers/steem/dsteem.js b/src/providers/steem/dsteem.js index c71464136..6570745fa 100644 --- a/src/providers/steem/dsteem.js +++ b/src/providers/steem/dsteem.js @@ -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) {