fix: replace ethers imports with viem and add type guards#59
fix: replace ethers imports with viem and add type guards#59kushbosamiya wants to merge 1 commit intoStabilityNexus:mainfrom
Conversation
- Replace parseEther import from ethers with viem in english-auction-service.ts - Replace parseEther import from ethers with viem in allpay-auction-service.ts - Replace formatEther import from ethers with viem in vickrey-commit-form.tsx - Add type predicate (auction): auction is Auction to .filter() calls in dashboard/page.tsx Resolves type errors caused by missing ethers type declarations and (Auction | undefined)[] not being assignable to Auction[].
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis pull request migrates format and parse utility imports from ethers to viem across auction-related files and adds TypeScript type predicates to filter operations in the dashboard to refine null-inclusive array types to non-null auction arrays. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
ethersmodule has no type declarations installed, causing TS errors in 3 filesPromise.allwith earlyreturnproduces(Auction | undefined)[]not assignable toAuction[]in dashboardChanges
parseEtherimport fromethers→vieminenglish-auction-service.tsandallpay-auction-service.tsformatEtherimport fromethers→vieminvickrey-commit-form.tsx(auction): auction is Auctionto.filter()calls indashboard/page.tsxviemalready exports both functions and is the primary Web3 library in this project.Summary by CodeRabbit