Skip to content

Conversation

@kien-ngo
Copy link
Contributor

@kien-ngo kien-ngo commented Dec 1, 2024

part of DASH-388


PR-Codex overview

This PR focuses on updating the return types in the convertFiatToCrypto and convertCryptoToFiat functions to return objects instead of plain numbers. Additionally, it refactors the SnapshotUpload component to replace Flex components with div elements and update Link components to a elements for better semantics.

Detailed summary

  • Changed the return type of convertFiatToCrypto to { result: number }.
  • Changed the return type of convertCryptoToFiat to { result: number }.
  • Replaced Flex components with div elements in SnapshotUpload for layout.
  • Updated Link components to a elements in SnapshotUpload for semantic correctness.

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

@vercel
Copy link

vercel bot commented Dec 1, 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 Dec 2, 2024 1:37pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 2, 2024 1:37pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 2, 2024 1:37pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 2, 2024 1:37pm

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground December 1, 2024 17:24 Inactive
@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 1, 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.

@vercel vercel bot temporarily deployed to Preview – docs-v2 December 1, 2024 17:24 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui December 1, 2024 17:24 Inactive
@kien-ngo kien-ngo marked this pull request as ready for review December 1, 2024 17:24
Copy link
Contributor Author

kien-ngo commented Dec 1, 2024

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Dec 1, 2024
@codecov
Copy link

codecov bot commented Dec 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.32%. Comparing base (ebf94a6) to head (4ae50f5).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5543   +/-   ##
=======================================
  Coverage   46.31%   46.32%           
=======================================
  Files        1082     1082           
  Lines       58672    58672           
  Branches     3955     3950    -5     
=======================================
+ Hits        27174    27178    +4     
+ Misses      30815    30811    -4     
  Partials      683      683           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from ebf94a6
packages 41.91% <ø> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
packages/thirdweb/src/pay/convert/cryptoToFiat.ts 92.30% <ø> (ø)
packages/thirdweb/src/pay/convert/fiatToCrypto.ts 92.00% <ø> (ø)

... and 3 files with indirect coverage changes

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 47.92 KB (0%) 959 ms (0%) 3.5 s (-0.45% 🔽) 4.4 s
thirdweb (cjs) 107.33 KB (0%) 2.2 s (0%) 5.6 s (-12.23% 🔽) 7.8 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 164 ms (+41.91% 🔺) 276 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 103 ms (+200.01% 🔺) 113 ms
thirdweb/react (minimal + tree-shaking) 18.28 KB (0%) 366 ms (0%) 397 ms (+57.48% 🔺) 763 ms

Copy link
Member

@MananTank MananTank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kien-ngo please attach linear ticket reference

@jnsdls jnsdls changed the base branch from kien/remove-tw-component-1 to graphite-base/5543 December 2, 2024 11:45
@jnsdls jnsdls force-pushed the graphite-base/5543 branch from 03468c0 to ebf94a6 Compare December 2, 2024 11:56
@jnsdls jnsdls force-pushed the kien/remove-chakra-snapshot-upload branch from 37c933f to f115b17 Compare December 2, 2024 11:56
@changeset-bot
Copy link

changeset-bot bot commented Dec 2, 2024

⚠️ No Changeset found

Latest commit: 4ae50f5

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 – wallet-ui December 2, 2024 11:56 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground December 2, 2024 11:56 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 December 2, 2024 11:56 Inactive
@jnsdls jnsdls changed the base branch from graphite-base/5543 to main December 2, 2024 11:56
@jnsdls jnsdls force-pushed the kien/remove-chakra-snapshot-upload branch from f115b17 to e37db1d Compare December 2, 2024 11:56
@vercel vercel bot temporarily deployed to Preview – wallet-ui December 2, 2024 11:57 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground December 2, 2024 11:57 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 December 2, 2024 11:57 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui December 2, 2024 12:30 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground December 2, 2024 12:30 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 December 2, 2024 12:30 Inactive
@kien-ngo kien-ngo requested a review from MananTank December 2, 2024 12:31
@kien-ngo kien-ngo force-pushed the kien/remove-chakra-snapshot-upload branch from 33eb953 to fb19ac2 Compare December 2, 2024 12:53
@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Dec 2, 2024
* });
* ```
* Result: `0.0000057` (a number)
* Result: `{ result: 0.0000057 }`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to sneak in this fix!

* });
*
* // Result: 3404.11
* // Result: `{ result: 3404.11 }`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to sneak in this fix!

@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 2, 2024

Merge activity

part of DASH-388

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating the return types in the `convertFiatToCrypto` and `convertCryptoToFiat` functions to return objects instead of plain numbers. Additionally, it modifies the `SnapshotUpload` component to replace `Link` elements with `a` tags and adjusts the layout for better styling.

### Detailed summary
- Changed return type of `convertFiatToCrypto` to `{ result: 0.0000057 }`.
- Changed return type of `convertCryptoToFiat` to `{ result: 3404.11 }`.
- Replaced `Link` components with `a` tags in `SnapshotUpload`.
- Adjusted layout and styling in `SnapshotUpload` for improved design.

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

<!-- end pr-codex -->
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. packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants