Skip to content

mosaicService.mosaicsAmountViewFromAddress only returns one mosaic #276

@dgarcia360

Description

@dgarcia360
  1. Expected behavior and actual behavior.

mosaicService.mosaicsAmountViewFromAddress only returns one MosaicAmountView object although it should return all of them.

  1. Steps to reproduce the problem.

The following snippet only logs one random MosaicAmountView corresponding to a mosaic owned by the user (not always the same).

 const mosaicService = new MosaicService(accountHttp, mosaicHttp);
 mosaicService.mosaicsAmountViewFromAddress(address).subscribe(x => console.log(x));

To get the full mosaics balance from an account, the dev has to manually pipe the object and transform the response to an array as follows.

 const mosaicService = new MosaicService(accountHttp, mosaicHttp);
 mosaicService.mosaicsAmountViewFromAddress(address)..pipe(mergeMap((_) => _).toArray()).subscribe(x => console.log(x));
  1. Specifications like the version of the project, operating system, or hardware.
  • nem2-sdk@0.13.3 (happens since the catbuffer integration if I remember correctly).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions