File tree Expand file tree Collapse file tree 5 files changed +27
-15
lines changed Expand file tree Collapse file tree 5 files changed +27
-15
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,21 @@ export class MosaicId {
4242 constructor ( id : string | number [ ] ) {
4343 if ( id instanceof Array ) {
4444 this . id = new Id ( id ) ;
45- } else if ( typeof id === 'string' ) {
45+ }
46+ /**
47+ * Deprecated initialization with MosaicName.
48+ * To be re-introduced after AliasTransaction implementation.
49+ *
50+ * @deprecated
51+ else if (typeof id === 'string') {
4652 this.fullName = id;
4753 const limiterPosition = id.indexOf(':');
4854 const namespaceName = id.substr(0, limiterPosition);
4955 const mosaicName = id.substr(limiterPosition + 1);
5056 this.id = new Id(MosaicIdentifierGenerator(namespaceName, mosaicName));
5157 }
58+ *
59+ */
5260 }
5361
5462 /**
Original file line number Diff line number Diff line change @@ -49,15 +49,13 @@ export class XEM extends Mosaic {
4949
5050 /**
5151 * mosaicId
52+ *
53+ * UInt64 XEM mosaic ID: [3294802500, 2243684972]
54+ * Hexadecimal XEM mosaic ID: 85bbea6cc462b244
55+ *
5256 * @type {Id }
5357 */
54- public static MOSAIC_ID = new MosaicId ( 'nem:xem' ) ;
55-
56- /**
57- * namespaceId
58- * @type {Id }
59- */
60- public static NAMESPACE_ID = new NamespaceId ( 'nem' ) ;
58+ public static MOSAIC_ID = new MosaicId ( [ 3294802500 , 2243684972 ] ) ;
6159
6260 /**
6361 * constructor
Original file line number Diff line number Diff line change @@ -20,15 +20,22 @@ import {MosaicId} from '../../../src/model/mosaic/MosaicId';
2020
2121describe ( 'MosaicId' , ( ) => {
2222
23+ /**
24+ * Deprecated initialization with MosaicName.
25+ * To be re-introduced after AliasTransaction implementation.
26+ *
27+ * @deprecated
2328 it('should be created from full name', () => {
2429 const id = new MosaicId('nem:xem');
25- deepEqual ( id . id , new Id ( [ 3646934825 , 3576016193 ] ) ) ;
30+ deepEqual(id.id, new Id([3294802500, 2243684972 ]));
2631 expect(id.fullName).to.be.equal('nem:xem');
2732 });
33+ *
34+ */
2835
2936 it ( 'should be created from id' , ( ) => {
30- const id = new MosaicId ( [ 3646934825 , 3576016193 ] ) ;
31- deepEqual ( id . id , new Id ( [ 3646934825 , 3576016193 ] ) ) ;
37+ const id = new MosaicId ( [ 3294802500 , 2243684972 ] ) ;
38+ deepEqual ( id . id , new Id ( [ 3294802500 , 2243684972 ] ) ) ;
3239 expect ( id . fullName ) . to . be . equal ( undefined ) ;
3340 } ) ;
3441} ) ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ describe('XEM', () => {
2626
2727 const xem = XEM . createRelative ( 1000 ) ;
2828
29- deepEqual ( xem . id . id . toHex ( ) , 'd525ad41d95fcf29 ' ) ;
29+ deepEqual ( xem . id . id . toHex ( ) , '85bbea6cc462b244 ' ) ;
3030 expect ( xem . amount . compact ( ) ) . to . be . equal ( 1000 * 1000000 ) ;
3131 } ) ;
3232
@@ -37,7 +37,6 @@ describe('XEM', () => {
3737 } ) ;
3838
3939 it ( 'should have valid statics' , ( ) => {
40- deepEqual ( XEM . NAMESPACE_ID . id , new NamespaceId ( [ 929036875 , 2226345261 ] ) . id ) ;
41- deepEqual ( XEM . MOSAIC_ID . id , new MosaicId ( [ 3646934825 , 3576016193 ] ) . id ) ;
40+ deepEqual ( XEM . MOSAIC_ID . id , new MosaicId ( [ 3294802500 , 2243684972 ] ) . id ) ;
4241 } ) ;
4342} ) ;
Original file line number Diff line number Diff line change @@ -73,6 +73,6 @@ describe('TransferTransaction', () => {
7373 240 ,
7474 signedTransaction . payload . length ,
7575 ) ) . to . be . equal ( '9050B9837EFAB4BBE8A4B9BB32D812F9885C00D8FC1650E1420D000100746573742D6D657373616765' +
76- '29CF5FD941AD25D500E1F50500000000 ' ) ;
76+ '44B262C46CEABB8500E1F50500000000 ' ) ;
7777 } ) ;
7878} ) ;
You can’t perform that action at this time.
0 commit comments