From e346236d75ee6248b54d2572cb3cf89e25fa39dd Mon Sep 17 00:00:00 2001 From: Akash Gianchandani Date: Wed, 1 Nov 2023 10:23:46 +0530 Subject: [PATCH] fix(sdk-coin-eth): fix issue related to ethtxbuilder WIN-1021 TICKET: WIN-1021 --- modules/sdk-coin-eth/src/lib/index.ts | 5 +++-- modules/sdk-coin-ethw/src/ethw.ts | 6 +++--- modules/sdk-coin-polygon/src/lib/transactionBuilder.ts | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/sdk-coin-eth/src/lib/index.ts b/modules/sdk-coin-eth/src/lib/index.ts index b04a8fe927..d9174843d7 100644 --- a/modules/sdk-coin-eth/src/lib/index.ts +++ b/modules/sdk-coin-eth/src/lib/index.ts @@ -1,8 +1,9 @@ // for Backwords Compatibility export * from '@bitgo/abstract-eth'; -// exporting the EthTransactionBuilder as it is needed in Ethw class -export { TransactionBuilder as EthTransactionBuilder } from './transactionBuilder'; +// exporting Ethereum TransactionBuilder and TransferBuilder +export { TransactionBuilder } from './transactionBuilder'; +export { TransferBuilder } from './transferBuilder'; // for Backwards Compatibility import { Interface, Utils } from '@bitgo/abstract-eth'; diff --git a/modules/sdk-coin-ethw/src/ethw.ts b/modules/sdk-coin-ethw/src/ethw.ts index 3ea8a4c360..4f513ccc00 100644 --- a/modules/sdk-coin-ethw/src/ethw.ts +++ b/modules/sdk-coin-ethw/src/ethw.ts @@ -15,7 +15,7 @@ import { VerifyTransactionOptions, } from '@bitgo/sdk-core'; import { BaseCoin as StaticsBaseCoin, coins } from '@bitgo/statics'; -import { Eth, optionalDeps, EthTransactionBuilder } from '@bitgo/sdk-coin-eth'; +import { Eth, optionalDeps, TransactionBuilder } from '@bitgo/sdk-coin-eth'; import { ExplainTransactionOptions } from '@bitgo/abstract-eth'; type FullNodeResponseBody = { @@ -170,7 +170,7 @@ export class Ethw extends Eth { * Create a new transaction builder for the current chain * @return a new transaction builder */ - protected getTransactionBuilder(): EthTransactionBuilder { - return new EthTransactionBuilder(coins.get(this.getChain())); + protected getTransactionBuilder(): TransactionBuilder { + return new TransactionBuilder(coins.get(this.getChain())); } } diff --git a/modules/sdk-coin-polygon/src/lib/transactionBuilder.ts b/modules/sdk-coin-polygon/src/lib/transactionBuilder.ts index a07395839f..98e4db88d9 100644 --- a/modules/sdk-coin-polygon/src/lib/transactionBuilder.ts +++ b/modules/sdk-coin-polygon/src/lib/transactionBuilder.ts @@ -1,4 +1,4 @@ -import { EthTransactionBuilder } from '@bitgo/sdk-coin-eth'; +import { TransactionBuilder as EthTransactionBuilder } from '@bitgo/sdk-coin-eth'; import { BuildTransactionError, TransactionType } from '@bitgo/sdk-core'; import { BaseCoin as CoinConfig } from '@bitgo/statics'; import EthereumAbi from 'ethereumjs-abi';