Skip to content

[TOOL-3689] Dashboard: Keep switch in disabled state if field value is empty in Sponsorship rules form #6535

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

Merged
merged 1 commit into from
Mar 25, 2025

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented Mar 24, 2025

PR-Codex overview

This PR focuses on refactoring the data transformation logic in the transformedQueryData object to improve the handling of allowedContractAddresses, allowedWallets, blockedWallets, and allowedChainIds, ensuring that empty values are filtered out properly.

Detailed summary

  • Refactored transformedQueryData to filter out empty strings and zeros from allowedContractAddresses, allowedWallets, blockedWallets, and allowedChainIds.
  • Simplified conditional checks for the presence of values before returning them.
  • Ensured allowedChainIds defaults to an empty array instead of null in the parsed values.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

linear bot commented Mar 24, 2025

Copy link

vercel bot commented Mar 24, 2025

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

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 25, 2025 10:46pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Mar 25, 2025 10:46pm
login ⬜️ Skipped (Inspect) Mar 25, 2025 10:46pm
thirdweb_playground ⬜️ Skipped (Inspect) Mar 25, 2025 10:46pm
wallet-ui ⬜️ Skipped (Inspect) Mar 25, 2025 10:46pm

@vercel vercel bot temporarily deployed to Preview – login March 24, 2025 17:27 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui March 24, 2025 17:27 Inactive
Copy link

changeset-bot bot commented Mar 24, 2025

⚠️ No Changeset found

Latest commit: f1df19e

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

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground March 24, 2025 17:27 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 March 24, 2025 17:27 Inactive
@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Mar 24, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@MananTank MananTank marked this pull request as ready for review March 24, 2025 17:27
@MananTank MananTank requested review from a team as code owners March 24, 2025 17:27
Copy link

codecov bot commented Mar 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.02%. Comparing base (9878153) to head (f1df19e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6535   +/-   ##
=======================================
  Coverage   55.02%   55.02%           
=======================================
  Files         881      881           
  Lines       55304    55304           
  Branches     3787     3787           
=======================================
  Hits        30429    30429           
  Misses      24780    24780           
  Partials       95       95           
Flag Coverage Δ
packages 55.02% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

github-actions bot commented Mar 24, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 47.56 KB (0%) 952 ms (0%) 202 ms (+247.67% 🔺) 1.2 s
thirdweb (cjs) 127.31 KB (0%) 2.6 s (0%) 245 ms (+37.79% 🔺) 2.8 s
thirdweb (minimal + tree-shaking) 5.6 KB (0%) 113 ms (0%) 115 ms (+2424.05% 🔺) 227 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 31 ms (+1966.67% 🔺) 41 ms
thirdweb/react (minimal + tree-shaking) 19.34 KB (0%) 387 ms (0%) 84 ms (+592.14% 🔺) 471 ms

Copy link
Contributor

graphite-app bot commented Mar 25, 2025

Merge activity

graphite-app bot pushed a commit that referenced this pull request Mar 25, 2025
…s empty in Sponsorship rules form (#6535)

<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on improving the handling of various policy attributes in the `transformedQueryData` object within the `AccountAbstractionSettingsPage` component. The changes ensure that only non-empty values are included, addressing potential issues with null or empty arrays.

### Detailed summary
- Refactored `transformedQueryData` to filter out empty values from `allowedContractAddresses`, `allowedWallets`, `blockedWallets`, and `allowedChainIds`.
- Simplified conditionals for returning values by directly using filtered results.
- Updated the handling of `allowedChainIds` to default to an empty array instead of null.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@vercel vercel bot temporarily deployed to Preview – docs-v2 March 25, 2025 09:39 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground March 25, 2025 09:39 Inactive
@vercel vercel bot temporarily deployed to Preview – login March 25, 2025 09:39 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui March 25, 2025 09:39 Inactive
MananTank added a commit that referenced this pull request Mar 25, 2025
…s empty in Sponsorship rules form (#6535)

<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on improving the handling of various policy attributes in the `transformedQueryData` object within the `AccountAbstractionSettingsPage` component. The changes ensure that only non-empty values are included, addressing potential issues with null or empty arrays.

### Detailed summary
- Refactored `transformedQueryData` to filter out empty values from `allowedContractAddresses`, `allowedWallets`, `blockedWallets`, and `allowedChainIds`.
- Simplified conditionals for returning values by directly using filtered results.
- Updated the handling of `allowedChainIds` to default to an empty array instead of null.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground March 25, 2025 22:30 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 March 25, 2025 22:30 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui March 25, 2025 22:30 Inactive
@vercel vercel bot temporarily deployed to Preview – login March 25, 2025 22:30 Inactive
…s empty in Sponsorship rules form (#6535)

<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on improving the `transformedQueryData` computation by filtering out empty values from the `policy` properties. It enhances data handling for `allowedContractAddresses`, `allowedWallets`, `blockedWallets`, and `allowedChainIds`, ensuring cleaner and more accurate data is returned.

### Detailed summary
- Refactored `transformedQueryData` to filter out empty values from `allowedContractAddresses`, `allowedWallets`, `blockedWallets`, and `allowedChainIds`.
- Simplified return conditions for these properties.
- Changed handling of `allowedChainIds` to return an empty array instead of null to prevent API issues.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@vercel vercel bot temporarily deployed to Preview – docs-v2 March 25, 2025 22:39 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui March 25, 2025 22:39 Inactive
@vercel vercel bot temporarily deployed to Preview – login March 25, 2025 22:39 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground March 25, 2025 22:39 Inactive
@graphite-app graphite-app bot merged commit f1df19e into main Mar 25, 2025
32 checks passed
@graphite-app graphite-app bot deleted the tool-3689 branch March 25, 2025 22:47
@vercel vercel bot temporarily deployed to Production – login March 25, 2025 22:47 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground March 25, 2025 22:47 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 March 25, 2025 22:47 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui March 25, 2025 22:47 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dashboard Involves changes to the Dashboard.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants