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

refactor: disable receive and send not toggleable #3467

Merged
merged 3 commits into from
Dec 17, 2024

Conversation

enesozturk
Copy link
Contributor

@enesozturk enesozturk commented Dec 16, 2024

Description

Disables receive and send features to be toggled as we don't support doing that yet.

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

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

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

Copy link

linear bot commented Dec 16, 2024

Copy link

vercel bot commented Dec 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
appkit-builder ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 2:03am
appkit-laboratory ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 2:03am
appkit-vue-solana ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 2:03am
appkit-wagmi-cdn-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 2:03am
vue-wagmi-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 2:03am

Copy link

changeset-bot bot commented Dec 16, 2024

⚠️ No Changeset found

Latest commit: 5b5772d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Dec 16, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 53.95% 14822 / 27472
🔵 Statements 53.95% 14822 / 27472
🔵 Functions 40.88% 1067 / 2610
🔵 Branches 75.39% 1891 / 2508
File CoverageNo changed files found.
Generated in workflow #8153 for commit 1b9fe23 by the Vitest Coverage Report Action

@@ -40,10 +40,7 @@ export function SectionWalletFeatures() {
updateFeatures({ swaps: !config.features.swaps })
return
case 'Receive':
Copy link
Contributor

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] ? (
Copy link
Contributor

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

Copy link
Collaborator

@tomiir tomiir Dec 16, 2024

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

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.

3 participants