Skip to content
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

fix: add getChainId to abstract wallet client #129

Merged
merged 2 commits into from
Dec 22, 2024
Merged

Conversation

coffeexcoin
Copy link
Collaborator

@coffeexcoin coffeexcoin commented Dec 21, 2024

Summary

Some libraries, notably ReservoirKit use the existence of getChainId to detect the presence of a wallet client. AbstractWalletActions extends Eip712WalletActions, NOT viem's WalletActions, and therefore does not have the getChainId method.

This PR adds this method, which should also resolve errors when attempting to use abstract wallet with reservoirkit.

Fixes reservoirprotocol/reservoir-kit#827

Commits

  • add getChainId to wallet actions
  • changeset

PR-Codex overview

This PR focuses on adding a getChainId method to the abstract wallet client, enhancing its functionality by allowing it to retrieve the chain ID.

Detailed summary

  • Added getChainId method to the AbstractWalletActions type.
  • Implemented getChainId in the globalWalletActions function to call the getChainId function from viem/actions.

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

@coffeexcoin coffeexcoin requested a review from cygaar as a code owner December 21, 2024 23:14
Copy link

changeset-bot bot commented Dec 21, 2024

🦋 Changeset detected

Latest commit: 4da7def

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

This PR includes changesets to release 3 packages
Name Type
@abstract-foundation/agw-client Patch
@abstract-foundation/agw-react Patch
@abstract-foundation/web3-react-agw 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

@coffeexcoin coffeexcoin changed the title fix/add getChainId fix: add getChainId to abstract wallet client Dec 21, 2024
Copy link

codecov bot commented Dec 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
packages/agw-client/src/walletActions.ts 84.87% <100.00%> (+0.25%) ⬆️

@coffeexcoin coffeexcoin merged commit 7445977 into main Dec 22, 2024
6 checks passed
@coffeexcoin coffeexcoin deleted the fix/add-getChainId branch December 22, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modals Fetch Listings Using Wrong Account Address
1 participant