File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
modules/sdk-coin-canton/src/lib Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 6060/modules /sdk-coin-baby / @ BitGo/ethalt-team
6161/modules /sdk-coin-bera / @ BitGo/ethalt-team
6262/modules /sdk-coin-bsc / @ BitGo/ethalt-team
63+ /module /sdk-coin-canton / @ BitGo/ethalt-team
6364/modules /sdk-coin-coredao / @ BitGo/ethalt-team
6465/modules /sdk-coin-cosmos / @ BitGo/ethalt-team
6566/modules /sdk-coin-cronos / @ BitGo/ethalt-team
Original file line number Diff line number Diff line change 1- import { BaseTransactionBuilderFactory } from '@bitgo/sdk-core' ;
1+ import { BaseTransaction , BaseTransactionBuilderFactory } from '@bitgo/sdk-core' ;
22import { TransactionBuilder } from './transactionBuilder' ;
33import { TransferBuilder } from './transferBuilder' ;
4+ import { WalletInitBuilder } from './walletInitBuilder' ;
5+ import { WalletInitTransaction } from './walletInitialization/walletInitTransaction' ;
46
57export class TransactionBuilderFactory extends BaseTransactionBuilderFactory {
68 /** @inheritdoc */
@@ -14,7 +16,17 @@ export class TransactionBuilderFactory extends BaseTransactionBuilderFactory {
1416 }
1517
1618 /** @inheritdoc */
17- getWalletInitializationBuilder ( ) : void {
18- throw new Error ( 'Method not implemented.' ) ;
19+ getWalletInitializationBuilder ( tx ?: WalletInitTransaction ) : WalletInitBuilder {
20+ return TransactionBuilderFactory . initializeBuilder ( tx , new WalletInitBuilder ( this . _coinConfig ) ) ;
21+ }
22+
23+ private static initializeBuilder < TTx extends BaseTransaction , TBuilder extends { initBuilder ( tx : TTx ) : void } > (
24+ tx : TTx | undefined ,
25+ builder : TBuilder
26+ ) : TBuilder {
27+ if ( tx ) {
28+ builder . initBuilder ( tx ) ;
29+ }
30+ return builder ;
1931 }
2032}
You can’t perform that action at this time.
0 commit comments