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

Improve standalone usage of SSX Gnosis Extension #69

Merged
merged 6 commits into from Jan 31, 2023

Conversation

Juliano1612
Copy link
Member

@Juliano1612 Juliano1612 commented Jan 27, 2023

Description

ssx-gnosis-extension helps to enable the DAO Login functionality by creating a modal and enabling selectors for end users. Because the module fetches the list of delegates for the sole purpose of displaying a selection UX to the user, the selected option is not currently matched against the retrieved list of delegates. This important security check is performed in SSX Server via a call to SiweMessage.verify, and these modules were designed to work together.
This change improves the experience for developers who want to use ssx-gnosis-extension standalone (that is, without SSX Server) by adding extra checks on the client side to help with UX. However, the server side MUST still check for delegate inclusion by using SiweMessage.verify or similar immediately after sign-in.

Type

  • Improvement

Diligence Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

44203
44203 previously requested changes Jan 30, 2023
packages/ssx-gnosis-extension/src/modal.ts Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Base: 90.41% // Head: 90.41% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (9ec52f0) compared to base (956cba7).
Patch coverage: 100.00% of modified lines in pull request are covered.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #69   +/-   ##
=======================================
  Coverage   90.41%   90.41%           
=======================================
  Files          25       25           
  Lines        3337     3339    +2     
  Branches      265      266    +1     
=======================================
+ Hits         3017     3019    +2     
  Misses        320      320           
Impacted Files Coverage Δ
packages/ssx-gnosis-extension/src/modal.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@skgbafa skgbafa left a comment

Choose a reason for hiding this comment

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

The logic here looks sounds and works as expected in the gnosis component when tested in SSX. I did not test as a standalone component however

@Juliano1612 Juliano1612 merged commit 63f70cf into spruceid:main Jan 31, 2023
@Juliano1612 Juliano1612 deleted the hotfix/gnosis-extension branch April 12, 2023 13:25
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.

None yet

5 participants