Skip to content

fix: implement buildSetOptionsOp helper for transaction builders#143

Merged
amina69 merged 2 commits intoamina69:developfrom
Yusufolosun:fix/sdk-transaction-builders-build-set-options-op-helper
Mar 30, 2026
Merged

fix: implement buildSetOptionsOp helper for transaction builders#143
amina69 merged 2 commits intoamina69:developfrom
Yusufolosun:fix/sdk-transaction-builders-build-set-options-op-helper

Conversation

@Yusufolosun
Copy link
Copy Markdown

Closes #116

Summary

Adds a dedicated buildSetOptionsOp helper for transaction builders, covering signer updates, threshold updates, and master weight updates.

Root Cause

The transaction builder surface lacked a setOptions helper, leaving signer/threshold configuration with no reusable builder function and no focused unit coverage.

Fix

Added buildSetOptionsOp in builder.ts with:

  • Signer key validation via existing validation utility
  • Signer add/remove support (weight 0 removes)
  • Threshold and masterWeight updates, including mixed input

Exported via index.ts.

Testing

Unit tests added in index.test.ts covering:

  • Add signer

  • Remove signer

  • Threshold updates

  • Mixed operations

  • Invalid signer key validation

  • lint passes

  • type-check passes

  • ✅ Unit coverage passes

  • build passes

CI

Local checks match required CI stages defined in sdk-ci.yml: lint, type-check, unit tests with coverage, and build.

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 30, 2026

@Yusufolosun Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Yusufolosun
Copy link
Copy Markdown
Author

Good day @amina69
I'm done with implementation and PR is up for review

@amina69 amina69 merged commit 6536602 into amina69:develop Mar 30, 2026
7 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