sei-protocol / sei-js

SeiJS is a monorepo that contains multiple NPM libraries for writing applications that interact with the Sei network.
44 stars 38 forks source link

Enhancement: Browser-Specific Export and SeiWallet Function Correction #96

Closed codebycarson closed 1 year ago

codebycarson commented 1 year ago

This pull request encompasses three primary enhancements aimed at refining both functionality and user experience within the library.

Polyfilled Browser-Specific Export:

In response to the concerns raised in PR#94, a new browser-specific export has been introduced. The polyfilled index-browser.ts file has been added and referenced in the package.json exports. This adjustment ensures that bundlers in "browser" environments will automatically select the polyfilled version, enhancing compatibility and performance and avoiding polyfilling on node only environments.

SeiWallet Function Correction:

Following the discussion in PR#93, the implementations within SeiWallet have been rectified to use the correct function.

UI Bug Fix in WalletSelectModal:

A minor UI bug has been rectified where re-clicking on a connected wallet within erroneously displayed a "trying to connect" message.

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 4f02ecc4884225e8c4ecf80a39eb2fee6dd7af5a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | ------------- | ----- | | @sei-js/react | Patch | | @sei-js/core | Patch |

Not sure what this means? Click here to learn what changesets are.

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

codecov-commenter commented 1 year ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (fef1115) 76.83% compared to head (4f02ecc) 76.66%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #96 +/- ## ========================================== - Coverage 76.83% 76.66% -0.18% ========================================== Files 33 33 Lines 449 450 +1 Branches 90 91 +1 ========================================== Hits 345 345 - Misses 104 105 +1 ``` | [Files](https://app.codecov.io/gh/sei-protocol/sei-js/pull/96?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol) | Coverage Δ | | |---|---|---| | [...components/WalletSelectModal/WalletSelectModal.tsx](https://app.codecov.io/gh/sei-protocol/sei-js/pull/96?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sei-protocol#diff-cGFja2FnZXMvcmVhY3Qvc3JjL2xpYi9jb21wb25lbnRzL1dhbGxldFNlbGVjdE1vZGFsL1dhbGxldFNlbGVjdE1vZGFsLnRzeA==) | `60.00% <0.00%> (-0.68%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codebycarson commented 1 year ago

This has been tested in @sei-js/core and @sei-js/react versions "0.0.0-internal-20231026034905".

Confirmed that the polyfill is not needed and vite correctly picks up the new index-browser file