From e75854b73e00ab9865060543dcf6a9e97122e7b4 Mon Sep 17 00:00:00 2001 From: mhelander Date: Tue, 30 Jan 2018 00:49:50 +0200 Subject: [PATCH] inally last bugfix for now for alias & PIN authrecall --- sea.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sea.js b/sea.js index 79ae06c7..39836d1a 100644 --- a/sea.js +++ b/sea.js @@ -557,9 +557,10 @@ const user = Object.assign(key, { at, proof }) const pIN = newPin || pin - const pinProp = pIN && Buffer.from(pIN, 'base64').toString('utf8') - return await finalizelogin(alias, user, root, { pin: newPin || pin }) + const pinProp = pIN && { pin: Buffer.from(pIN, 'base64').toString('utf8') } + + return await finalizelogin(alias, user, root, pinProp) } catch (e) { // TODO: right log message ? Gun.log('Failed to finalize login with new password!') const { err = '' } = e || {}