Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

wallet-connectors: WalletConnect: Implement binary message signing #43

Merged
merged 12 commits into from
Apr 23, 2024

Conversation

bisgardo
Copy link
Contributor

@bisgardo bisgardo commented Jul 6, 2023

Purpose

Support signing binary messages with schema over WalletConnect.

Changes

If the message is "binary" it's encoded into hex and the schema provided in an additional field (encoded as base64). If the wallet doesn't read the schema, it's going to present it non-decoded. And of course sign the hex encoding of the bytes rather than the bytes themselves.

Resolves CBW-1211.

@bisgardo bisgardo changed the title wallet-connector: WalletConnect: Implement binary message signing wallet-connectors: WalletConnect: Implement binary message signing Aug 14, 2023
bisgardo added 10 commits April 23, 2024 13:56
If the message is "binary" it's encoded into hex and the schema provided in an additional field (encoded as base64). If the wallet doesn't read the schema, it's just going to present it non-decoded.

Unrelated change: Fixed helper functions in sample dapps for extracting the message of an error - WalletConnect has a habit of throwing errors with empty message, meaning that the error is erroneously type cast to a string.
The fix is not really correct (it will only work as expected for WalletConnect - other string and Error values will not look right) - the proper fix is described in the TODOs added in wallet-connectors:WalletConnect.ts.
To match other PR... And alphabetizes... Keepachangelog doesn't seem to suggest any ordering.
@DOBEN DOBEN force-pushed the walletconnect/sign-message-schema branch from 609c3b8 to 002dfbf Compare April 23, 2024 11:31
@DOBEN DOBEN marked this pull request as ready for review April 23, 2024 11:46
@DOBEN DOBEN force-pushed the walletconnect/sign-message-schema branch from c5ad794 to 89f5e8c Compare April 23, 2024 11:47
@DOBEN DOBEN force-pushed the walletconnect/sign-message-schema branch from 4823c0c to d75ee44 Compare April 23, 2024 12:41
Copy link
Contributor Author

@bisgardo bisgardo left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@DOBEN DOBEN merged commit e514901 into main Apr 23, 2024
1 check passed
@DOBEN DOBEN deleted the walletconnect/sign-message-schema branch April 23, 2024 13:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants