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

feat: detect chainID by default for testnet networks in tx builder functions #1746

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zone117x
Copy link
Member

@zone117x zone117x commented Oct 17, 2024

This PR was published to npm with the version 6.16.1
e.g. npm install @stacks/[email protected] --save-exact

Updates the transaction builder functions to make them lookup the network chain_id by default when constructing txs for a custom testnet network. Behavior for mainnet and for primary testnet is unchanged.

Non-breaking
If the /v2/info request fails, e.g. when constructing a tx either offline or without expecting the network RPC to be available, then by default it will fallback to using the chainID already specified in the network object (which is typically either the default primary testnet chainID, or a user-specified chainID).

@zone117x zone117x requested a review from janniks October 17, 2024 15:12
Copy link

vercel bot commented Oct 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
stacksjs-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2024 3:38pm

Copy link

codecov bot commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 69.56522% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/transactions/src/builders.ts 69.56% 7 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In Review
Development

Successfully merging this pull request may close these issues.

1 participant