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

remove legacy signature type #1851

Merged
merged 3 commits into from
Mar 25, 2024
Merged

Conversation

zkokelj
Copy link
Contributor

@zkokelj zkokelj commented Mar 25, 2024

Why this change is needed

I already removed old wallet extension endpoints from the gateway. Now we only use and produce new signatures (EIP712 and PersonalSign). There is no need to support old legacy format anymore and it just adds additional complexity to our codebase.

What changes were made as part of this PR

Removed old legacy format for signed viewing keys.

PR checks pre-merging

Please indicate below by ticking the checkbox that you have read and performed the required
PR checks

  • PR checks reviewed and performed

@zkokelj zkokelj marked this pull request as ready for review March 25, 2024 14:03
Copy link
Collaborator

@BedrockSquirrel BedrockSquirrel left a comment

Choose a reason for hiding this comment

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

LGTM, but probably better to avoid hardcoded chain ID if poss.

func GenerateViewingKeyForWallet(wal wallet.Wallet) (*ViewingKey, error) {
// generate an ECDSA key pair to encrypt sensitive communications with the obscuro enclave
vk, err := crypto.GenerateKey()
chainID := int64(443)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think wallet has a chainID field on it, might be better to use that rather than hardcoding if poss. In case we end up with different chainIDs on diff Ten networks eventually.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nice, fixed 👍

@zkokelj zkokelj merged commit fe8b248 into main Mar 25, 2024
2 checks passed
@zkokelj zkokelj deleted the ziga/remove_old_we_message_format_support branch March 25, 2024 15:05
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.

2 participants