Skip to content

Commit 1525071

Browse files
committed
Added #82
Handles null mosaic property
1 parent ac24850 commit 1525071

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/infrastructure/MosaicHttp.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ export class MosaicHttp extends Http implements MosaicRepository {
8282
PublicAccount.createFromPublicKey(mosaicInfoDTO.mosaic.owner, networkType),
8383
mosaicInfoDTO.mosaic.revision,
8484
new MosaicProperties(
85-
new UInt64(mosaicFlag),
86-
(new UInt64(divisibility)).compact(),
85+
mosaicFlag ? new UInt64(mosaicFlag) : UInt64.fromUint(0),
86+
(divisibility ? new UInt64(divisibility) : UInt64.fromUint(0)).compact(),
8787
duration ? new UInt64(duration) : undefined,
8888
),
8989
);
@@ -123,8 +123,8 @@ export class MosaicHttp extends Http implements MosaicRepository {
123123
PublicAccount.createFromPublicKey(mosaicInfoDTO.mosaic.owner, networkType),
124124
mosaicInfoDTO.mosaic.revision,
125125
new MosaicProperties(
126-
new UInt64(mosaicFlag),
127-
(new UInt64(divisibility)).compact(),
126+
mosaicFlag ? new UInt64(mosaicFlag) : UInt64.fromUint(0),
127+
(divisibility ? new UInt64(divisibility) : UInt64.fromUint(0)).compact(),
128128
duration ? new UInt64(duration) : undefined,
129129
),
130130
);

0 commit comments

Comments
 (0)