hive-keychain/hive-keychain-extension

Add account menu (after signing a transaction for the community creation) showing posting key as the same as active key

4Ykw opened this issue · 5 comments

4Ykw commented

After finding out more information about what led me to open #94, I have tested the process once more with ecency + keychain and found out that the issue is being caused somewhere before or at the new account (in this case a community account specifically) is being asked to be added to Hive Keychain.

image

So, I am trying to understand what part of the code deducts those private keys and shows them on screen (it might be at that stage that the posting key is being shown as the same as the active key). I am guessing this could be a simple array index missed out.

The broadcasted transaction for debug purposes is here:
https://hiveblocks.com/tx/4d860c696d4dcd8bd7aa9075636ef4f9cd3a48ab

4Ykw commented

Not sure if this is related:

https://github.com/stoodkev/hive-keychain/blob/149d8f70865140eeb94f3ec00529791ced0c9ff6/html/popup.html

https://github.com/stoodkev/hive-keychain/blob/149d8f70865140eeb94f3ec00529791ced0c9ff6/html/popup.html#L200

    <div id="master_check" class="hide-at-start">
      <div class="back_add_key back_enabled"></div>
      <p id="import_success"></p>
      <div class="key_checkbox" id="import_posting">
        <label for="posting_key" class="checkbox_container">
          <div class="import_key_title"></div>
          <div class="import_key_info"></div>
          <input type="checkbox" checked="checked" id="posting_key" />
          <span class="checkmark" />
        </label>
      </div>
      <div class="key_checkbox" id="import_active">
        <label for="active_key" class="checkbox_container">
          <div class="import_key_title"></div>
          <div class="import_key_info"></div>
          <input type="checkbox" checked="true" id="active_key" />
          <span class="checkmark" />
        </label>
      </div>
      <div class="key_checkbox" id="import_memo">
        <label for="memo_key" class="checkbox_container">
          <div class="import_key_title"></div>
          <div class="import_key_info"></div>
          <input type="checkbox" checked="true" id="memo_key" />
          <span class="checkmark" />
        </label>
      </div>
      <button id="save_master"></button>
    </div>

Screen Shot 2021-06-18 at 3 52 10 PM

The keys are directly sent by the frontend that makes the request.
In the example above I'm sending a b and c as posting active and memo keys respectively:

Reference for requestAddAccount :
https://github.com/stoodkev/hive-keychain#requestaddaccount

Perhaps the dApp you used is passing the wrong key

4Ykw commented

So is it not deducted by the master key? (will ask him again) but I understood from good-karma that the website was sending only the master password.

Using the 4 keys it works yes. But I thought that using the master password was a different process in the extension.

4Ykw commented

I have now contacted good-karma. Let's wait until I can get some confirmation from their side.

4Ykw commented

Found it!

ecency/ecency-vision#540

Thanks for the verification @stoodkev