@@ -22,6 +22,7 @@ import {PublicAccount} from '../model/account/PublicAccount';
2222import { CosignatureSignedTransaction } from '../model/transaction/CosignatureSignedTransaction' ;
2323import { Deadline } from '../model/transaction/Deadline' ;
2424import { SignedTransaction } from '../model/transaction/SignedTransaction' ;
25+ import { SyncAnnounce } from '../model/transaction/SyncAnnounce' ;
2526import { Transaction } from '../model/transaction/Transaction' ;
2627import { TransactionAnnounceResponse } from '../model/transaction/TransactionAnnounceResponse' ;
2728import { TransactionStatus } from '../model/transaction/TransactionStatus' ;
@@ -93,7 +94,7 @@ export class TransactionHttp extends Http implements TransactionRepository {
9394 transactionStatusDTO . status ,
9495 transactionStatusDTO . hash ,
9596 Deadline . createFromDTO ( transactionStatusDTO . deadline ) ,
96- new UInt64 ( transactionStatusDTO . height ) ) ;
97+ transactionStatusDTO . height ? new UInt64 ( transactionStatusDTO . height ) : UInt64 . fromUint ( 0 ) ) ;
9798 } ) ) ;
9899 }
99100
@@ -115,7 +116,7 @@ export class TransactionHttp extends Http implements TransactionRepository {
115116 transactionStatusDTO . status ,
116117 transactionStatusDTO . hash ,
117118 Deadline . createFromDTO ( transactionStatusDTO . deadline ) ,
118- new UInt64 ( transactionStatusDTO . height ) ) ;
119+ transactionStatusDTO . height ? new UInt64 ( transactionStatusDTO . height ) : UInt64 . fromUint ( 0 ) ) ;
119120 } ) ;
120121 } ) ) ;
121122 }
@@ -182,27 +183,11 @@ export class TransactionHttp extends Http implements TransactionRepository {
182183 } else {
183184 return CreateTransactionFromDTO ( response ) ;
184185 }
185- } ) , catchError ( ( err ) => {
186+ } ) , catchError ( ( err ) => {
186187 if ( err . statusCode === 405 ) {
187188 return observableThrowError ( 'non sync server' ) ;
188189 }
189190 return observableThrowError ( err ) ;
190- } ) , ) ;
191- }
192- }
193-
194- class SyncAnnounce {
195- constructor ( /**
196- * Transaction serialized data
197- */
198- public readonly payload : string ,
199- /**
200- * Transaction hash
201- */
202- public readonly hash : string ,
203- /**
204- * Transaction address
205- */
206- public readonly address : string ) {
191+ } ) ) ;
207192 }
208193}
0 commit comments