Skip to content

feat(sdk-core): export PrebuildTransactionFeeInfo type#9279

Open
mmcshinsky-bitgo wants to merge 1 commit into
masterfrom
side/types-prebuild-fee-info
Open

feat(sdk-core): export PrebuildTransactionFeeInfo type#9279
mmcshinsky-bitgo wants to merge 1 commit into
masterfrom
side/types-prebuild-fee-info

Conversation

@mmcshinsky-bitgo

@mmcshinsky-bitgo mmcshinsky-bitgo commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Export PrebuildTransactionFeeInfo from iWallet.ts and convert PrebuildTransactionResult from interface to type.
  • Reuse it in TSS UnsignedTransactionTss / MPCTx (Required<PrebuildTransactionFeeInfo>) and Express FeeInfo codec/type alias.
  • Not from @bitgo/public-types — existing public-types feeInfo shapes differ (required fields / fee: string | number on unsigned tx).

Out of scope (different shapes)

  • iBaseCoin UnsignedTransaction.feeInfo (fee: number | BigNumber)
  • coin-specific FeeInfo (XRP, TRX, UTXO recovery, go-staking)
  • bitgo-ui PrebuildTransactionResultDetails.feeInfo (adds payGoFee, gas*, etc.)

Test plan

  • yarn unit-test --scope @bitgo/sdk-core (or the prebuildTransactionTypes suite)
  • yarn tsc --noEmit in modules/sdk-core

No ticket — local side improvement (WEB-000).

@mmcshinsky-bitgo
mmcshinsky-bitgo force-pushed the side/types-prebuild-fee-info branch 3 times, most recently from 1813bba to d78b912 Compare July 16, 2026 15:52
Export PrebuildTransactionFeeInfo from iWallet.ts, convert
PrebuildTransactionResult to a type alias, and reuse the fee shape in
TSS unsigned/MPC types and the Express FeeInfo codec.

WEB-000
@mmcshinsky-bitgo
mmcshinsky-bitgo marked this pull request as ready for review July 16, 2026 16:42
@mmcshinsky-bitgo
mmcshinsky-bitgo requested review from a team as code owners July 16, 2026 16:42
@mmcshinsky-bitgo mmcshinsky-bitgo self-assigned this Jul 16, 2026
/** Fee as string */
feeString: t.string,
});
export type FeeInfo = PrebuildTransactionFeeInfo;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the standard t.TypeOf construction would be more appropriate - from here I have no way to tell if they are in fact equal and will stay equal

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