@@ -21,6 +21,7 @@ import { DtoMapping } from '../core/utils/DtoMapping';
2121import { AccountInfo } from '../model/account/AccountInfo' ;
2222import { AccountNames } from '../model/account/AccountNames' ;
2323import { AccountRestrictionsInfo } from '../model/account/AccountRestrictionsInfo' ;
24+ import { ActivityBucket } from '../model/account/ActivityBucket' ;
2425import { Address } from '../model/account/Address' ;
2526import { MultisigAccountGraphInfo } from '../model/account/MultisigAccountGraphInfo' ;
2627import { MultisigAccountInfo } from '../model/account/MultisigAccountInfo' ;
@@ -79,11 +80,20 @@ export class AccountHttp extends Http implements AccountRepository {
7980 map ( ( response : { response : ClientResponse ; body : AccountInfoDTO ; } ) => {
8081 const accountInfoDTO = response . body ;
8182 return new AccountInfo (
82- accountInfoDTO . meta ,
8383 Address . createFromEncoded ( accountInfoDTO . account . address ) ,
8484 new UInt64 ( accountInfoDTO . account . addressHeight ) ,
8585 accountInfoDTO . account . publicKey ,
8686 new UInt64 ( accountInfoDTO . account . publicKeyHeight ) ,
87+ accountInfoDTO . account . accountType . valueOf ( ) ,
88+ accountInfoDTO . account . linkedAccountKey ,
89+ accountInfoDTO . account . activityBuckets . map ( ( bucket ) => {
90+ return new ActivityBucket (
91+ bucket . startHeight ,
92+ bucket . totalFeesPaid ,
93+ bucket . beneficiaryCount ,
94+ bucket . rawScore ,
95+ ) ;
96+ } ) ,
8797 accountInfoDTO . account . mosaics . map ( ( mosaicDTO ) => new Mosaic (
8898 new MosaicId ( mosaicDTO . id ) ,
8999 new UInt64 ( mosaicDTO . amount ) ,
@@ -147,16 +157,28 @@ export class AccountHttp extends Http implements AccountRepository {
147157 const accountsInfoMetaDataDTO = response . body ;
148158 return accountsInfoMetaDataDTO . map ( ( accountInfoDTO : AccountInfoDTO ) => {
149159 return new AccountInfo (
150- accountInfoDTO . meta ,
151160 Address . createFromEncoded ( accountInfoDTO . account . address ) ,
152161 new UInt64 ( accountInfoDTO . account . addressHeight ) ,
153162 accountInfoDTO . account . publicKey ,
154163 new UInt64 ( accountInfoDTO . account . publicKeyHeight ) ,
155- accountInfoDTO . account . mosaics . map ( ( mosaicDTO : MosaicDTO ) =>
156- new Mosaic ( new MosaicId ( mosaicDTO . id ) , new UInt64 ( mosaicDTO . amount ) ) ) ,
164+ accountInfoDTO . account . accountType . valueOf ( ) ,
165+ accountInfoDTO . account . linkedAccountKey ,
166+ accountInfoDTO . account . activityBuckets . map ( ( bucket ) => {
167+ return new ActivityBucket (
168+ bucket . startHeight ,
169+ bucket . totalFeesPaid ,
170+ bucket . beneficiaryCount ,
171+ bucket . rawScore ,
172+ ) ;
173+ } ) ,
174+ accountInfoDTO . account . mosaics . map ( ( mosaicDTO ) => new Mosaic (
175+ new MosaicId ( mosaicDTO . id ) ,
176+ new UInt64 ( mosaicDTO . amount ) ,
177+ ) ) ,
157178 new UInt64 ( accountInfoDTO . account . importance ) ,
158179 new UInt64 ( accountInfoDTO . account . importanceHeight ) ,
159180 ) ;
181+
160182 } ) ;
161183 } ) ,
162184 catchError ( ( error ) => throwError ( error ) ) ,
@@ -195,12 +217,12 @@ export class AccountHttp extends Http implements AccountRepository {
195217 . pipe ( map ( ( response : { response : ClientResponse ; body : MultisigAccountInfoDTO ; } ) => {
196218 const multisigAccountInfoDTO = response . body ;
197219 return new MultisigAccountInfo (
198- PublicAccount . createFromPublicKey ( multisigAccountInfoDTO . multisig . account , networkType ) ,
220+ PublicAccount . createFromPublicKey ( multisigAccountInfoDTO . multisig . accountPublicKey , networkType ) ,
199221 multisigAccountInfoDTO . multisig . minApproval ,
200222 multisigAccountInfoDTO . multisig . minRemoval ,
201- multisigAccountInfoDTO . multisig . cosignatories
223+ multisigAccountInfoDTO . multisig . cosignatoryPublicKeys
202224 . map ( ( cosigner ) => PublicAccount . createFromPublicKey ( cosigner , networkType ) ) ,
203- multisigAccountInfoDTO . multisig . multisigAccounts
225+ multisigAccountInfoDTO . multisig . multisigPublicKeys
204226 . map ( ( multisigAccount ) => PublicAccount . createFromPublicKey ( multisigAccount , networkType ) ) ,
205227 ) ;
206228 } ) ,
@@ -224,12 +246,12 @@ export class AccountHttp extends Http implements AccountRepository {
224246 multisigAccounts . set ( multisigAccountGraphInfoDTO . level ,
225247 multisigAccountGraphInfoDTO . multisigEntries . map ( ( multisigAccountInfoDTO ) => {
226248 return new MultisigAccountInfo (
227- PublicAccount . createFromPublicKey ( multisigAccountInfoDTO . multisig . account , networkType ) ,
249+ PublicAccount . createFromPublicKey ( multisigAccountInfoDTO . multisig . accountPublicKey , networkType ) ,
228250 multisigAccountInfoDTO . multisig . minApproval ,
229251 multisigAccountInfoDTO . multisig . minRemoval ,
230- multisigAccountInfoDTO . multisig . cosignatories
252+ multisigAccountInfoDTO . multisig . cosignatoryPublicKeys
231253 . map ( ( cosigner ) => PublicAccount . createFromPublicKey ( cosigner , networkType ) ) ,
232- multisigAccountInfoDTO . multisig . multisigAccounts
254+ multisigAccountInfoDTO . multisig . multisigPublicKeys
233255 . map ( ( multisigAccountDTO ) =>
234256 PublicAccount . createFromPublicKey ( multisigAccountDTO , networkType ) ) ) ;
235257 } ) ,
0 commit comments