Skip to content

fix(builder): pass network to makeTxBuilder for correct slot config#204

Merged
solidsnakedev merged 4 commits intomainfrom
fix/slot-config-network
Mar 14, 2026
Merged

fix(builder): pass network to makeTxBuilder for correct slot config#204
solidsnakedev merged 4 commits intomainfrom
fix/slot-config-network

Conversation

@solidsnakedev
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings March 13, 2026 12:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes slot configuration resolution in the SDK’s transaction builder by ensuring the client passes the selected network into makeTxBuilder(), and adds a regression test to verify validity interval slot conversion differs across networks.

Changes:

  • Pass network into makeTxBuilder() from both read-only and signing clients so slot presets resolve correctly.
  • Add a new TxBuilder test suite validating network-specific slot conversion for validity intervals.
  • Add a changeset documenting the patch release.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/evolution/test/TxBuilder.SlotConfig.test.ts Adds regression tests to ensure validity interval times convert to slots using the correct network’s slot config.
packages/evolution/src/sdk/client/ClientImpl.ts Introduces toBuilderNetwork() and wires network through to makeTxBuilder() in client constructors.
.changeset/fix-slot-config-network.md Declares a patch release describing the slot-config fix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +118 to +131
const toBuilderNetwork = (networkId: NetworkId): Network.Network => {
if (typeof networkId === "number") {
return networkId === 1 ? "Mainnet" : "Preview"
}
switch (networkId) {
case "mainnet":
return "Mainnet"
case "preprod":
return "Preprod"
case "preview":
return "Preview"
default:
return "Mainnet"
}
@solidsnakedev solidsnakedev merged commit c1c6cb1 into main Mar 14, 2026
9 checks passed
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.

2 participants