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

[WalletConnect] Send dapp's origin in the request #702

Open
katspaugh opened this issue May 23, 2023 · 2 comments
Open

[WalletConnect] Send dapp's origin in the request #702

katspaugh opened this issue May 23, 2023 · 2 comments

Comments

@katspaugh
Copy link
Member

katspaugh commented May 23, 2023

Currently the WalletConnect app sends its host as the origin string. This makes the tx-service display a nice icon and the app's name in the history, but it's not very useful. Basically all non-Safe App transactions are either WalletConnect, or from the safe mobile apps, or direct contract interactions.

Screenshot 2023-05-23 at 11 15 11

It would be more useful to send the connected dapp's origin instead. Or in addition to the WC origin to keep the app usage analytics intact.

E.g. if you're connected to OpenSea, send opensea.io as the dapp origin. This will allow us to add domain-based security checks on the Safe wallet side.

@github-project-automation github-project-automation bot moved this to New issues in Safe{Wallet} May 23, 2023
@katspaugh katspaugh changed the title [WalletConnect] Use dapp's origin instead of WalletConnect's own host as "origin" [WalletConnect] Send dapp's origin in the request May 23, 2023
@katspaugh
Copy link
Member Author

@mmv08's feedback:

  • It should be a separate new field to keep origin as it was for analytics' purposes
  • To make a new field, we'd have to modify web-core, the SDK and the backend (tx-service should save it in the tx entity)

@katspaugh
Copy link
Member Author

Since adding a completely new field is a lot of work across frontend, SDK and backend, and it's only needed for the WalletConnect app, perhaps adding the dapp's host as a query param to the existing origin field would be simpler and work just fine. In the frontend, we already cut off everything sans the domain part from the origin string when sending it to the backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New issues
Development

No branches or pull requests

1 participant