@@ -481,44 +481,3 @@ const extractMessage = (message: any): PlainMessage | EncryptedMessage => {
481481 }
482482 return msgObj ;
483483} ;
484-
485- /**
486- * Extract beneficiary public key from DTO.
487- *
488- * @todo Upgrade of catapult-rest WITH catapult-service-bootstrap versioning.
489- *
490- * With `cow` upgrade (nemtech/catapult-server@0.3.0.2), `catapult-rest` block DTO
491- * was updated and latest catapult-service-bootstrap uses the wrong block DTO.
492- * This will be fixed with next catapult-server upgrade to `dragon`.
493- *
494- * :warning It is currently not possible to read the block's beneficiary public key
495- * except when working with a local instance of `catapult-rest`.
496- *
497- * @param beneficiary {string | undefined} The beneficiary public key if set
498- * @return {Mosaic[] }
499- */
500- export const extractBeneficiary = (
501- blockDTO : any ,
502- networkType : NetworkType ,
503- ) : PublicAccount | undefined => {
504-
505- let dtoPublicAccount : PublicAccount | undefined ;
506- let dtoFieldValue : string | undefined ;
507- if ( blockDTO . beneficiaryPublicKey ) {
508- dtoFieldValue = blockDTO . beneficiaryPublicKey ;
509- } else if ( blockDTO . beneficiary ) {
510- dtoFieldValue = blockDTO . beneficiary ;
511- }
512-
513- if ( ! dtoFieldValue ) {
514- return undefined ;
515- }
516-
517- try {
518- // @FIX with latest catapult-service-bootstrap version, catapult-rest still returns
519- // a `string` formatted copy of the public *when it is set at all*.
520- dtoPublicAccount = PublicAccount . createFromPublicKey ( dtoFieldValue , networkType ) ;
521- } catch ( e ) { dtoPublicAccount = undefined ; }
522-
523- return dtoPublicAccount ;
524- } ;
0 commit comments