Skip to content

Conversation

@sandra-wang-bitgo
Copy link
Contributor

@sandra-wang-bitgo sandra-wang-bitgo commented Nov 7, 2025

Description

This PR adds support for the isTestTransaction parameter in wallet transactions for both TSS and multisig wallets. The parameter can now be passed through prebuildTransaction() and sendMany() methods and will be correctly sent to the API.

Problem

We want to send isTestTransaction to indicate that the client wants to initiate a test transaction which should be under 25 USD to an unverified to-be-whitelisted address.

Solution

Code Changes

  1. Added isTestTransaction to interfaces:

    • PrebuildTransactionOptions - makes it available for both TSS and multisig wallets
    • PopulatedIntent - ensures it's included in the intent sent to the API
  2. Pass parameter through the TSS flow:

    • Updated prebuildTransactionTxRequests() to include isTestTransaction for transfer transactions
    • Updated populateIntent() in mpcUtils.ts to include isTestTransaction in the base intent
  3. Inheritance for sendMany():

    • SendManyOptions inherits isTestTransaction via PrebuildAndSignTransactionOptionsPrebuildTransactionOptions
    • No additional code changes needed; works automatically through inheritance

Test Coverage

Added comprehensive unit tests:

  • Test that isTestTransaction is correctly passed from prebuildTransaction() to prebuildTxWithIntent() for TSS wallets
  • Test that isTestTransaction flows through sendMany()prebuildAndSignTransaction()prebuildTransaction()
  • Added proper TypeScript assertions with existence checks to prevent type errors

TICKET: CS-6339

@sandra-wang-bitgo sandra-wang-bitgo requested review from a team as code owners November 7, 2025 17:03
@sandra-wang-bitgo sandra-wang-bitgo marked this pull request as draft November 7, 2025 17:31
@sandra-wang-bitgo sandra-wang-bitgo changed the title feat(wallet): pass isTestTransaction parameter to TSS transfer txrequests API feat(wallet): pass isTestTransaction parameter to TSS transfer txrequests API and Multisig sendMany API Nov 7, 2025
@sandra-wang-bitgo sandra-wang-bitgo changed the title feat(wallet): pass isTestTransaction parameter to TSS transfer txrequests API and Multisig sendMany API feat(sdk-api): pass isTestTransaction parameter to TSS transfer txrequests API and Multisig sendMany API Nov 7, 2025
@sandra-wang-bitgo sandra-wang-bitgo force-pushed the sandra/cs-6339 branch 3 times, most recently from 63e6afe to fee8b8b Compare November 7, 2025 19:36
for withdrawals

Add isTestTransaction parameter support for wallet transactions:
- Add isTestTransaction to PrebuildTransactionOptions interface
 (available for both TSS and multisig wallets)
- Pass isTestTransaction through prebuildTransactionTxRequests
for TSS transfer transactions
- Include isTestTransaction in PopulatedIntent and baseIntent
objects for TSS wallet flow
- SendManyOptions inherits isTestTransaction via
PrebuildAndSignTransactionOptions

Add comprehensive test coverage:
- Test isTestTransaction is passed through prebuildTransaction for TSS wallets
- Test isTestTransaction flows through sendMany to prebuildAndSignTransaction
- Add proper TypeScript assertions with existence checks

This ensures the isTestTransaction flag is correctly sent to the
/api/v2/wallet/:walletId/txrequests endpoint for TSS wallets (e.g., NEAR)
and is available for multisig wallets when building transfer transactions
via prebuildTransaction() or sendMany().

TICKET: CS-6399
@sandra-wang-bitgo sandra-wang-bitgo marked this pull request as ready for review November 7, 2025 20:13
@sandra-wang-bitgo
Copy link
Contributor Author

@sandra-wang-bitgo sandra-wang-bitgo merged commit 838a76d into master Nov 11, 2025
13 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.

3 participants