Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@profile): copy chat key rather than transformed key #5787

Closed
wants to merge 1 commit into from

Conversation

alaibe
Copy link
Collaborator

@alaibe alaibe commented May 17, 2022

fixes #5775

the copy needs to be on the real chat key, not the transformed one used
for UI

@status-im-auto
Copy link
Member

status-im-auto commented May 17, 2022

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ dfbd60d #1 2022-05-17 12:10:00 ~10 min macos 📦dmg
✔️ dfbd60d #1 2022-05-17 12:10:38 ~11 min linux 📦tgz
✔️ dfbd60d #1 2022-05-17 12:20:29 ~21 min windows 📦exe
✔️ 32e6041 #2 2022-05-17 14:19:17 ~9 min macos 📦dmg
✔️ 32e6041 #2 2022-05-17 14:20:31 ~10 min linux 📦tgz
✔️ 32e6041 #2 2022-05-17 14:32:17 ~22 min windows 📦exe

@saledjenic
Copy link
Contributor

@anastasiyaig isn't weird from the UI side to have one string displayed and clicking on the "copy" button get something else stored in clipboard? :)
I get the gist of it, but maybe we can do it somehow different from the UI perspective.

@alaibe
Copy link
Collaborator Author

alaibe commented May 17, 2022

The UI displayed is "short version of the chat key" but the copy button needs to be the real chat key
e.g if you want to send your chat key to a friend!

However I agree this may confuse the user, UI could be different, we should I think have a way to expand to the real chat key

The most confusing in the display is not the ... in the middle but the fact that we remove the prefix 0x04

Copy link
Contributor

@osmaczko osmaczko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The UI displayed is "short version of the chat key" but the copy button needs to be the real chat key
e.g if you want to send your chat key to a friend!

It's the opposite of: #5361

However I agree this may confuse the user, UI could be different, we should I think have a way to expand to the real chat key

IMO we should still copy the compressed key. Backward compatibility is an issue indeed, maybe when clicking on copy button the context menu should appear:
[-- copy compressed key --]
[-- copy raw key --]

The most confusing in the display is not the ... in the middle but the fact that we remove the prefix 0x04

The prefix 0x04 is "removed" because key is compressed and encoded, see: status-im/status-go#1937 (comment)

@saledjenic
Copy link
Contributor

maybe when clicking on copy button the context menu should appear:
[-- copy compressed key --]
[-- copy raw key --]

This is something I would like to have, at least more intuitive.

@alaibe
Copy link
Collaborator Author

alaibe commented May 17, 2022

@osmaczko Out of curiosity why would you copy the compressed key?

When I tried to add a contact I needed the raw key, has this changed too? (edit: I use 0.3 so backward compatibility is not working)

Does a user know that they are using compressed key vs chat key?
Our UI only display chat key, I think we should "only" copy the real chat key

fixes #5775

the copy needs to be on the real chat key, not the transformed one used
for UI
@alaibe alaibe force-pushed the fix/copy-chat-key branch from dfbd60d to 32e6041 Compare May 17, 2022 14:09
@osmaczko
Copy link
Contributor

osmaczko commented May 17, 2022

@osmaczko Out of curiosity why would you copy the compressed key?

Because the user should only know about compressed key representation. It's the user interface, joining links and qr codes should be adapted to that. In other words, raw keys should be only used internally.

Does a user know that they are using compressed key vs chat key?

Answer above.

When I tried to add a contact I needed the raw key, has this changed too? (edit: I use 0.3 so backward compatibility is not working)

raw key (only because of backward compatibility) or compressed key -> new app (should work)
compressed key -> old app (can't work)

@alaibe alaibe closed this May 17, 2022
@alaibe alaibe deleted the fix/copy-chat-key branch May 17, 2022 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chat key seems incorrect in profile
4 participants