@@ -2,7 +2,8 @@ import { BaseKey, BuildTransactionError, SigningError, BaseTransactionBuilder, T
22import { BaseCoin as CoinConfig } from '@bitgo/statics' ;
33import BigNumber from 'bignumber.js' ;
44import { Address } from './address' ;
5- import { Fee , IndexedData , IndexedSignature , Key , Operation , OriginationOp , RevealOp , TransactionOp } from './iface' ;
5+ import { Fee , IndexedData , IndexedSignature , Key , OriginationOp , RevealOp , TransactionOp } from './iface' ;
6+ import { OperationContents } from '@taquito/rpc' ;
67import { KeyPair } from './keyPair' ;
78import {
89 forwarderOriginationOperation ,
@@ -149,34 +150,34 @@ export class TransactionBuilder extends BaseTransactionBuilder {
149150 }
150151 // TODO: make changes to the transaction if any extra parameter has been set then sign it
151152 } else {
152- let contents : Operation [ ] = [ ] ;
153+ let contents : OperationContents [ ] = [ ] ;
153154 switch ( this . _type ) {
154155 case TransactionType . AccountUpdate :
155156 if ( this . _publicKeyToReveal ) {
156- contents . push ( this . buildPublicKeyRevelationOperation ( ) ) ;
157+ contents . push ( this . buildPublicKeyRevelationOperation ( ) as OperationContents ) ;
157158 }
158159 break ;
159160 case TransactionType . WalletInitialization :
160161 if ( this . _publicKeyToReveal ) {
161- contents . push ( this . buildPublicKeyRevelationOperation ( ) ) ;
162+ contents . push ( this . buildPublicKeyRevelationOperation ( ) as OperationContents ) ;
162163 }
163- contents . push ( this . buildWalletInitializationOperations ( ) ) ;
164+ contents . push ( this . buildWalletInitializationOperations ( ) as OperationContents ) ;
164165 break ;
165166 case TransactionType . Send :
166167 if ( this . _publicKeyToReveal ) {
167- contents . push ( this . buildPublicKeyRevelationOperation ( ) ) ;
168+ contents . push ( this . buildPublicKeyRevelationOperation ( ) as OperationContents ) ;
168169 }
169- contents = contents . concat ( await this . buildSendTransactionContent ( ) ) ;
170+ contents = contents . concat ( ( await this . buildSendTransactionContent ( ) ) as OperationContents [ ] ) ;
170171 break ;
171172 case TransactionType . AddressInitialization :
172173 if ( this . _publicKeyToReveal ) {
173- contents . push ( this . buildPublicKeyRevelationOperation ( ) ) ;
174+ contents . push ( this . buildPublicKeyRevelationOperation ( ) as OperationContents ) ;
174175 }
175- contents = contents . concat ( this . buildForwarderDeploymentContent ( ) ) ;
176+ contents . push ( this . buildForwarderDeploymentContent ( ) as OperationContents ) ;
176177 break ;
177178 case TransactionType . SingleSigSend :
178179 // No support for revelation txns as primary use case is to send from fee address
179- contents = contents . concat ( await this . buildSendTransactionContent ( ) ) ;
180+ contents = contents . concat ( ( await this . buildSendTransactionContent ( ) ) as OperationContents [ ] ) ;
180181 break ;
181182 default :
182183 throw new BuildTransactionError ( 'Unsupported transaction type' ) ;
0 commit comments