extension icon indicating copy to clipboard operation
extension copied to clipboard

feat(ledger): add utf-8 message signing support

Open kyranjamie opened this issue 1 year ago • 2 comments

Try out this version of the Hiro Wallet - download extension builds.

WIP.

This PR adds support for UTF-8 message signing for Ledger.

I've refactored many duplicated components, yet retained an approach where each Ledger interaction is composed of generic components, making use of Route state where action-specific textual changes are needed. The current set up allows each Ledger action to either use the generic component if sufficient, or a bespoke component if necessary.

kyranjamie avatar Jul 21 '22 14:07 kyranjamie

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
stacks-wallet-web ✅ Ready (Inspect) Visit Preview Sep 6, 2022 at 11:50AM (UTC)

vercel[bot] avatar Jul 21 '22 14:07 vercel[bot]

Made a first pass through, looks like some good improvements while adding the message signing flow. 👍 I saw you moved the routes in with the feature which is interesting.

fbwoolf avatar Jul 21 '22 15:07 fbwoolf

@kyranjamie getting this on the latest build using Stacks app v0.23.1...

Screen Shot 2022-08-16 at 1 35 57 PM

fbwoolf avatar Aug 16 '22 18:08 fbwoolf

To clarify, that is when on testnet > using test-app > clicking on a button to sign a message.

EDIT: And, performing a contract call is successful.

fbwoolf avatar Aug 16 '22 18:08 fbwoolf

Did you checkout branch or try the build directly? If former, make sure to yarn, this is an error from old version of connect afaict

kyranjamie avatar Aug 17 '22 10:08 kyranjamie

Did you checkout branch or try the build directly? If former, make sure to yarn, this is an error from old version of connect afaict

This was from the latest downloaded build. I can try again today.

fbwoolf avatar Aug 17 '22 10:08 fbwoolf

Did you checkout branch or try the build directly? If former, make sure to yarn, this is an error from old version of connect afaict

Does the test-app need to be run from this branch? That I am running locally.

fbwoolf avatar Aug 17 '22 10:08 fbwoolf

Does the test-app need to be run from this branch? That I am running locally.

Yes, with latest packages

kyranjamie avatar Aug 17 '22 10:08 kyranjamie

@kyranjamie ok, I am seeing this with the Signature (Testnet) button:

Screen Shot 2022-08-17 at 9 39 30 AM

Signature with line breaks is no longer breaking the lines? Also, it is successful but doesn't close the popup. Screen Shot 2022-08-17 at 9 40 28 AM

Signature with long message is successful, but doesn't close the popup on success.

fbwoolf avatar Aug 17 '22 14:08 fbwoolf

Maybe it never broke the lines on that screen? It does on the details screen before so was thinking it did.

fbwoolf avatar Aug 17 '22 14:08 fbwoolf

Thanks for the feedback @fbwoolf—sorry totally forgot that we're also waiting on these changes in Stacks.js https://github.com/hirosystems/stacks.js/pull/1329

kyranjamie avatar Aug 18 '22 14:08 kyranjamie

Signature with long message is successful, but doesn't close the popup on success.

Fixed, had it not closing for debugging purposes

kyranjamie avatar Sep 06 '22 12:09 kyranjamie

This is safe to merge, as it won't change existing behaviour

kyranjamie avatar Sep 06 '22 12:09 kyranjamie