Skip to content

fix: improve provider method signatures and parseNearAmount type safety#1691

Merged
denbite merged 7 commits into
pre-release/v7from
claude/fix-provider-methods-01TgkqVGDDxH2PrcaAgYXH69
Nov 19, 2025
Merged

fix: improve provider method signatures and parseNearAmount type safety#1691
denbite merged 7 commits into
pre-release/v7from
claude/fix-provider-methods-01TgkqVGDDxH2PrcaAgYXH69

Conversation

@r-near

@r-near r-near commented Nov 18, 2025

Copy link
Copy Markdown
Contributor
  • Make parseNearAmount parameter required (no longer accepts undefined)
  • Add default wait_until='EXECUTED_OPTIMISTIC' for viewTransactionStatus
  • Add default wait_until='EXECUTED_OPTIMISTIC' for viewTransactionStatusWithReceipts
  • Rename viewValidatorsV2 back to viewValidators with improved signature
  • Update test to remove invalid null test case for parseNearAmount

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

Test Plan

Related issues/PRs

@changeset-bot

changeset-bot Bot commented Nov 18, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f8666a0

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

This PR includes changesets to release 1 package
Name Type
near-api-js Major

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

- Make parseNearAmount parameter required (no longer accepts undefined)
- Add default wait_until='EXECUTED_OPTIMISTIC' for viewTransactionStatus
- Add default wait_until='EXECUTED_OPTIMISTIC' for viewTransactionStatusWithReceipts
- Rename viewValidatorsV2 back to viewValidators with improved signature
- Update test to remove invalid null test case for parseNearAmount
@r-near r-near force-pushed the claude/fix-provider-methods-01TgkqVGDDxH2PrcaAgYXH69 branch from 414de17 to 34d1fc3 Compare November 18, 2025 17:21
@r-near r-near marked this pull request as ready for review November 18, 2025 18:13

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/utils/format.ts Outdated
@denbite

denbite commented Nov 18, 2025

Copy link
Copy Markdown
Contributor

@r-near changeset file is needed

Comment thread src/utils/format.ts Outdated
- Add empty string validation after cleanupAmount to throw an error
- Prevents dangerous behavior where empty form fields would be treated as 0 NEAR
- Add tests for empty string, whitespace, and comma-only inputs
- Add changeset file documenting breaking changes
@denbite denbite merged commit ff1f96b into pre-release/v7 Nov 19, 2025
3 checks passed
@denbite denbite deleted the claude/fix-provider-methods-01TgkqVGDDxH2PrcaAgYXH69 branch November 19, 2025 21:02
@github-project-automation github-project-automation Bot moved this from NEW❗ to Shipped 🚀 in DevTools Nov 19, 2025
@github-actions github-actions Bot mentioned this pull request Nov 19, 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.

4 participants