Skip to content

Conversation

@itzukerman
Copy link
Collaborator

@itzukerman itzukerman commented Jun 5, 2025

Pull Request Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes (link to the issue here)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Chore / Documentation
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Locally tested against Fireblocks API

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules
  • I have added corresponding labels to the PR

@github-actions github-actions bot added the enhancement New feature or request label Jun 5, 2025
@goweiss goweiss requested a review from Copilot June 5, 2025 11:35
Copy link

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 adds support for including a custom NCW header (X-End-User-Wallet-Id) in all SDK API calls and updates Web3 connection methods to accept an optional requestOptions parameter.

  • Introduce an optional requestOptions argument to Web3 connection methods in FireblocksSDK
  • Centralize NCW header injection into a new addNCWHeader helper in ApiClient
  • Refactor each issue*Request method to call addNCWHeader instead of inline header logic

Reviewed Changes

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

File Description
src/fireblocks-sdk.ts Extended getWeb3Connections, submitWeb3Connection, and removeWeb3Connection to accept requestOptions
src/api-client.ts Added private addNCWHeader method and updated all issueGetRequest, issuePostRequest, issuePutRequest, issuePatchRequest, and issueDeleteRequest to use it
Comments suppressed due to low confidence (2)

src/fireblocks-sdk.ts:1626

  • Add JSDoc for the new requestOptions parameter to getWeb3Connections to explain its purpose and structure.
+        order,

src/api-client.ts:68

  • No tests verify that addNCWHeader correctly sets X-End-User-Wallet-Id; consider adding unit tests for scenarios with and without requestOptions.ncw.walletId.
+        this.addNCWHeader(headers, requestOptions);

@itzukerman itzukerman merged commit b4d6f3e into master Jun 5, 2025
11 checks passed
@YoavBZ YoavBZ added bug Something isn't working and removed enhancement New feature or request labels Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants