Skip to content

Conversation

denbite
Copy link
Contributor

@denbite denbite commented Aug 5, 2025

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • Commit messages follow the conventional commits spec
  • If this is a code change: I have written unit tests.
  • If this changes code in a published package: I have run pnpm changeset to create a changeset JSON document appropriate for this change.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Fixes the issue reported by the community of interface misalignment

Type 'JsonRpcProvider' is not assignable to type 'Provider'.
  The types returned by 'callFunction(...)' are incompatible between these types.
    Type 'Promise<T | undefined>' is not assignable to type 'Promise<T>'.
      Type 'T | undefined' is not assignable to type 'T'.
        'T' could be instantiated with an arbitrary type which could be unrelated to 'T | undefined'.

Test Plan

Related issues/PRs

Copy link

changeset-bot bot commented Aug 5, 2025

🦋 Changeset detected

Latest commit: b78f334

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

This PR includes changesets to release 16 packages
Name Type
@near-js/providers Patch
near-api-js Patch
@near-js/cookbook Patch
@near-js/accounts Patch
@near-js/biometric-ed25519 Patch
@near-js/client Patch
@near-js/crypto Patch
@near-js/iframe-rpc Patch
@near-js/keystores-browser Patch
@near-js/keystores-node Patch
@near-js/keystores Patch
@near-js/signers Patch
@near-js/tokens Patch
@near-js/transactions Patch
@near-js/types Patch
@near-js/utils 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

@github-project-automation github-project-automation bot moved this to NEW❗ in DevTools Aug 5, 2025
@denbite denbite changed the title Fix Provider interface misalignment Fix interface misalignment between Provider and JsonRpcProvider Aug 5, 2025
@denbite denbite enabled auto-merge August 5, 2025 19:50
@denbite denbite merged commit 6a8a8dc into master Aug 5, 2025
2 checks passed
@denbite denbite deleted the fix_provider_interface branch August 5, 2025 20:40
@github-project-automation github-project-automation bot moved this from NEW❗ to Shipped 🚀 in DevTools Aug 5, 2025
@github-actions github-actions bot mentioned this pull request Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Shipped 🚀
Development

Successfully merging this pull request may close these issues.

2 participants