Skip to content

Centralize approval logic #2058

@GrandSchtroumpf

Description

@GrandSchtroumpf

Currently the approval logic runs on every change. This is expensive and force complex logic to support both classic transaction with EIP7702.
Best would be to move the approval down the line, and trigger it once we know EIP7702 isn't an option.
A potential side effect would be to delay the modal opening (~500ms to 1s) as we need to check for approval at the end instead of all the time.

Once this is done we could have a centralize creation function (useCreateStrategy) in all places, including the cart and migration page.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions