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

chore: refactor signature types to different components #380

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

pnarayanaswamy
Copy link
Contributor

No description provided.

@Montoya Montoya marked this pull request as ready for review December 17, 2024 14:54
@Montoya Montoya merged commit 7b2cba1 into modular Dec 17, 2024
5 checks passed
@Montoya Montoya deleted the modular-signatures branch December 17, 2024 14:56
Montoya added a commit that referenced this pull request Jan 21, 2025
* Move ENS Resolution to separate file

* lint fixes

* Move send form to separate file

* chore: refactor signature types to different components (#380)

* chore: refactor signature types to different components

* fix: injection order of components

* Simplify loading a batch of modules

* Use parentContainer pattern across all components

* Migrate malformed transactions form

And committing a naming crime, but we will allow it

* Use event listeners for enabling buttons when connected

This introduces a new parameters on `globalContext` called `_connected` with a getter and setter. When set to a new value, the setter dispatches a custom event `globalConnectionChange`. Each module with a button that needs to be enabled when MetaMask is connected thus has an event listener for that event. Now, those buttons are enabled via the listener.

This gets us part way to relying on listeners for all state changes.

* Move encrypt-decrypt to separate module

* Migrate encrypt-decrypt and all PPOMs

Also fix a few small errors from previous commits

* Fix imports

* fix: permit message verification (#382)

* chore: Split transactions into separate components (#383)

* chore: Split transactions into separate components

* chore: add index.js to export all modules

* chore: add index.js to export all modules

* Move interactions section to module files

* Move connections to separate files

Unfortunately most of the connection logic is still in index.js and is hard to untangle

* Wrap an error message in template string

* Migrate type onchange handler to module

* Move sendDeepLink href set to module

* set deep links in erc20 component code

* Fix glaring typo

* Programmatic sections

* lint fixes

* Move more events and utils

* Lint fix and remove array

* Decentralize clearDisplayElements

* No more allConnectedButtons

* Change innerHTML to innerText

* No more initializeFormElements

* Move 1559-related DOM updates to separate files

* Move updating DOM for deployed contract to separate files

* Move updating network specific buttons to separate file

* Simplify connection event logic

* Two more custom events

* Fix small error

* Remove unneeded lint disable line

* fix: enable defaults on wallet connect (#384)

---------

Co-authored-by: Priya <[email protected]>
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