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

try to get userID from URL if not present in query params #1538

Merged
merged 5 commits into from
Sep 21, 2023

Conversation

zkokelj
Copy link
Contributor

@zkokelj zkokelj commented Sep 20, 2023

Why this change is needed

We need to add hardhat support for using Obscuro Gateway: https://github.com/obscuronet/obscuro-internal/issues/2171

Currently hardhat is not using queryParameters and this prevents users from using it via Obscuro Gateway.
We decided do provide a way by adding /<userID> at the end of the request URL.

This is a temporary solution, because HTTPS does not encrypt URL (but encrypts query parameters).

During testing I found and fixed another small mistake on frontend (we need to sign address in lowercase)

What changes were made as part of this PR

Please provide a high level list of the changes made

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 September 21, 2023 08:50
Copy link
Collaborator

@tudor-malene tudor-malene left a comment

Choose a reason for hiding this comment

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

lgtm.
Pls add comment

return userID, err
}

// Alternatively, try to get it from URL path
Copy link
Collaborator

Choose a reason for hiding this comment

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

pls add a comment here that this is a temporary hack to work around a hard hat bug

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

Copy link
Collaborator

@tudor-malene tudor-malene left a comment

Choose a reason for hiding this comment

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

lgtm

@zkokelj zkokelj merged commit 34aeae3 into main Sep 21, 2023
@zkokelj zkokelj deleted the ziga/add_userid_support_for_hardhat branch September 21, 2023 10:37
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