-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
refactor: disable receive and send not toggleable #3467
refactor: disable receive and send not toggleable #3467
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Coverage Report
File CoverageNo changed files found. |
@@ -40,10 +40,7 @@ export function SectionWalletFeatures() { | |||
updateFeatures({ swaps: !config.features.swaps }) | |||
return | |||
case 'Receive': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove case
check here if it's no longer used ?
@@ -124,7 +131,9 @@ export const WalletFeatureItem = React.memo( | |||
> | |||
{handle ? <Handle {...handleProps} {...listeners} /> : null} | |||
<span className="text-sm flex-1">{value}</span> | |||
<Checkbox checked={featureEnabledMap[value as WalletFeatureName]} /> | |||
{featureCanBeToggledMap[value as WalletFeatureName] ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe better to do this ?
const featureCanBeToggledMap = {
Buy: true,
Swap: true,
Receive: false,
Send: false
} as WalletFeatureName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can do
const featureCanBeToggledMap = {
Buy: true,
Swap: true,
Receive: false,
Send: false
} as const
and it will work
Description
Disables receive and send features to be toggled as we don't support doing that yet.
Type of change
Associated Issues
For Linear issues: Closes APKT-xxx
For GH issues: closes #...
Showcase (Optional)
If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.
Checklist