Skip to content

Conversation

@kien-ngo
Copy link
Contributor

@kien-ngo kien-ngo commented Oct 24, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR focuses on adding validation for the minVoteQuorumRequiredPercent parameter in the deploy-vote.ts file and updating related tests to ensure proper error handling and functionality.

Detailed summary

  • Added validation for minVoteQuorumRequiredPercent in deploy-vote.ts:
    • Checks for NaN, range (0-100), and integer-like values.
  • Updated tests in deploy-vote.test.ts:
    • Modified test to check for invalid non-integer values.
  • Refactored variable names for clarity in test files.
  • Removed redundant tests in proposalExists.test.ts and updated assertions.

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

@changeset-bot
Copy link

changeset-bot bot commented Oct 24, 2024

⚠️ No Changeset found

Latest commit: 5dc1899

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
Copy link

vercel bot commented Oct 24, 2024

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

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 25, 2024 4:15am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 25, 2024 4:15am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 25, 2024 4:15am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 25, 2024 4:15am

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 24, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

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

Copy link
Contributor Author

kien-ngo commented Oct 24, 2024

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

Join @kien-ngo and the rest of your teammates on Graphite Graphite

@kien-ngo kien-ngo force-pushed the kien/improve-vote-contract-tests branch from a37e234 to c8aa874 Compare October 24, 2024 09:51
@kien-ngo kien-ngo marked this pull request as ready for review October 24, 2024 09:52
@github-actions
Copy link
Contributor

github-actions bot commented Oct 24, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 42.9 KB (+0.08% 🔺) 859 ms (+0.08% 🔺) 3 s (+22.29% 🔺) 3.9 s
thirdweb (cjs) 102.73 KB (0%) 2.1 s (0%) 8.2 s (-1.48% 🔽) 10.2 s
thirdweb (minimal + tree-shaking) 4.84 KB (0%) 97 ms (0%) 702 ms (+248.28% 🔺) 799 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 85 ms (+110.42% 🔺) 95 ms
thirdweb/react (minimal + tree-shaking) 17.34 KB (0%) 347 ms (0%) 497 ms (+2.34% 🔺) 843 ms

@codecov
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 46.66667% with 8 lines in your changes missing coverage. Please review.

Project coverage is 45.36%. Comparing base (4b18351) to head (5dc1899).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...s/thirdweb/src/extensions/prebuilts/deploy-vote.ts 46.66% 8 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5156   +/-   ##
=======================================
  Coverage   45.36%   45.36%           
=======================================
  Files        1068     1068           
  Lines       55230    55230           
  Branches     3969     3971    +2     
=======================================
  Hits        25055    25055           
  Misses      29483    29483           
  Partials      692      692           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 4b18351
packages 40.38% <46.66%> (ø)

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...s/thirdweb/src/extensions/prebuilts/deploy-vote.ts 74.50% <46.66%> (ø)

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 25, 2024

Merge activity

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing validation for the `minVoteQuorumRequiredPercent` parameter in the `deploy-vote.ts` file and updating corresponding tests to ensure correct functionality.

### Detailed summary
- Added validation for `minVoteQuorumRequiredPercent` in `deploy-vote.ts`.
- Included checks for NaN, range (0-100), and integer-like values.
- Updated tests in `deploy-vote.test.ts` to handle new validation logic.
- Adjusted test descriptions and assertions in `vote.test.ts`.

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

<!-- end pr-codex -->
@kien-ngo kien-ngo force-pushed the kien/improve-split-contract-tests branch from 39ea040 to 4b18351 Compare October 25, 2024 03:59
@kien-ngo kien-ngo force-pushed the kien/improve-vote-contract-tests branch from c8aa874 to 5dc1899 Compare October 25, 2024 03:59
Base automatically changed from kien/improve-split-contract-tests to main October 25, 2024 04:11
@graphite-app graphite-app bot merged commit 5dc1899 into main Oct 25, 2024
28 of 29 checks passed
@graphite-app graphite-app bot deleted the kien/improve-vote-contract-tests branch October 25, 2024 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants