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

Fix: soften fallback handler warning #2716

Merged
merged 4 commits into from
Nov 1, 2023
Merged

Fix: soften fallback handler warning #2716

merged 4 commits into from
Nov 1, 2023

Conversation

katspaugh
Copy link
Member

@katspaugh katspaugh commented Oct 31, 2023

What it solves

The original custom fallback handler warning was added in #1781.

We got feedback from CowSwap that the current warning is too scary to the users when they enable a custom handler for TWAP orders. So we're changing the icon and message to be less alerting.

Official:
Screenshot 2023-11-01 at 13 43 06

Custom:
Screenshot 2023-11-01 at 13 43 28

Unset:
Screenshot 2023-11-01 at 13 48 14

@katspaugh katspaugh requested a review from schmanu October 31, 2023 12:02
@github-actions
Copy link

github-actions bot commented Oct 31, 2023

Branch preview

✅ Deploy successful!

https://fallback--walletweb.review-wallet-web.5afe.dev

Copy link
Member

@schmanu schmanu left a comment

Choose a reason for hiding this comment

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

If the CowSwap TWAP fallback handler is also static we could allowlist it's address instead. If it is a completely unknown fallback handler I would prefer a warning.
What do you think?

@katspaugh
Copy link
Member Author

@schmanu allowlist where?

Copy link

github-actions bot commented Oct 31, 2023

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link

github-actions bot commented Oct 31, 2023

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
75.26% (+0.11% 🔼)
9402/12492
🔴 Branches
49.55% (+0.17% 🔼)
1929/3893
🔴 Functions
58.18% (+0.3% 🔼)
1419/2439
🟡 Lines
76.9% (+0.07% 🔼)
8509/11065
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / module.ts
8.99% (-1.24% 🔻)
15.38%
7.41% (-0.28% 🔻)
10.26% (-1.28% 🔻)

Test suite run success

1044 tests passing in 142 suites.

Report generated by 🧪jest coverage report action from 507a1c0

@schmanu
Copy link
Member

schmanu commented Nov 1, 2023

@schmanu allowlist where?

For now we could have a list in our repo of known fallback handler addresses where we add the CoW Extensible Fallback Handler addresses
But ideally that would live on the config service / gateway.

I'm just thinking in general having an unexpected / inofficial fallbackhandler hints at a potentially risky setup. Or do we know many other dApps / protocols that use custom fallback handlers?

@katspaugh
Copy link
Member Author

If you're implying hardcoding it, I wouldn't do it.

@liliya-soroka
Copy link
Member

liliya-soroka commented Nov 1, 2023

All custom fallbackhandlers will be green after the fix . I would check with the prod team if it's expected and safe
image

@liliya-soroka liliya-soroka added question Further information is requested and removed question Further information is requested labels Nov 1, 2023
@katspaugh
Copy link
Member Author

Fixed. ✅

Official:
Screenshot 2023-11-01 at 13 43 06

Custom:
Screenshot 2023-11-01 at 13 43 28

Unset:
Screenshot 2023-11-01 at 13 48 14

@liliya-soroka
Copy link
Member

Verified

@katspaugh katspaugh merged commit 236c541 into dev Nov 1, 2023
7 checks passed
@katspaugh katspaugh deleted the fallback branch November 1, 2023 14:57
@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants