diff --git a/package-lock.json b/package-lock.json index 98479ffa6a..48c86d38c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1307,9 +1307,9 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "catbuffer-typescript": { - "version": "0.0.20", - "resolved": "https://registry.npmjs.org/catbuffer-typescript/-/catbuffer-typescript-0.0.20.tgz", - "integrity": "sha512-dww9nmGqMyyHF+D53cqxBGppq0rfjG+Jvorfho8BGZ4cOwXTwdUDoD+HTpn6f0ZlBW2w8LlbBPEGNdR9CIeyHQ==" + "version": "0.0.21-alpha-202006221403", + "resolved": "https://registry.npmjs.org/catbuffer-typescript/-/catbuffer-typescript-0.0.21-alpha-202006221403.tgz", + "integrity": "sha512-2iyyjv4r4RbHs6PasTLvcwPUERgNH9GEUxAlrxho+yj5gbb/ctPoNcbCNAKefFdEEimUoBK1uLyEIVu49vlQZg==" }, "chai": { "version": "4.1.2", diff --git a/package.json b/package.json index 63bbcc1048..13da88b060 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ }, "dependencies": { "bluebird": "^3.7.2", - "catbuffer-typescript": "0.0.20", + "catbuffer-typescript": "0.0.21-alpha-202006221403", "crypto-js": "^4.0.0", "diff": "^4.0.2", "futoin-hkdf": "^1.3.1", diff --git a/src/model/transaction/SecretLockTransaction.ts b/src/model/transaction/SecretLockTransaction.ts index a9ea47b783..b4c5864485 100644 --- a/src/model/transaction/SecretLockTransaction.ts +++ b/src/model/transaction/SecretLockTransaction.ts @@ -216,11 +216,11 @@ export class SecretLockTransaction extends Transaction { TransactionType.SECRET_LOCK.valueOf(), new AmountDto(this.maxFee.toDTO()), new TimestampDto(this.deadline.toDTO()), + new UnresolvedAddressDto(this.recipientAddress.encodeUnresolvedAddress(this.networkType)), new Hash256Dto(this.getSecretByte()), new UnresolvedMosaicBuilder(new UnresolvedMosaicIdDto(this.mosaic.id.id.toDTO()), new AmountDto(this.mosaic.amount.toDTO())), new BlockDurationDto(this.duration.toDTO()), this.hashAlgorithm.valueOf(), - new UnresolvedAddressDto(this.recipientAddress.encodeUnresolvedAddress(this.networkType)), ); return transactionBuilder.serialize(); } @@ -235,11 +235,11 @@ export class SecretLockTransaction extends Transaction { this.versionToDTO(), this.networkType.valueOf(), TransactionType.SECRET_LOCK.valueOf(), + new UnresolvedAddressDto(this.recipientAddress.encodeUnresolvedAddress(this.networkType)), new Hash256Dto(this.getSecretByte()), new UnresolvedMosaicBuilder(new UnresolvedMosaicIdDto(this.mosaic.id.id.toDTO()), new AmountDto(this.mosaic.amount.toDTO())), new BlockDurationDto(this.duration.toDTO()), this.hashAlgorithm.valueOf(), - new UnresolvedAddressDto(this.recipientAddress.encodeUnresolvedAddress(this.networkType)), ); } diff --git a/src/model/transaction/SecretProofTransaction.ts b/src/model/transaction/SecretProofTransaction.ts index 19a19c7e46..9c2a7193e1 100644 --- a/src/model/transaction/SecretProofTransaction.ts +++ b/src/model/transaction/SecretProofTransaction.ts @@ -197,9 +197,9 @@ export class SecretProofTransaction extends Transaction { TransactionType.SECRET_PROOF.valueOf(), new AmountDto(this.maxFee.toDTO()), new TimestampDto(this.deadline.toDTO()), + new UnresolvedAddressDto(this.recipientAddress.encodeUnresolvedAddress(this.networkType)), new Hash256Dto(this.getSecretByte()), this.hashAlgorithm.valueOf(), - new UnresolvedAddressDto(this.recipientAddress.encodeUnresolvedAddress(this.networkType)), this.getProofByte(), ); return transactionBuilder.serialize(); @@ -215,9 +215,9 @@ export class SecretProofTransaction extends Transaction { this.versionToDTO(), this.networkType.valueOf(), TransactionType.SECRET_PROOF.valueOf(), + new UnresolvedAddressDto(this.recipientAddress.encodeUnresolvedAddress(this.networkType)), new Hash256Dto(this.getSecretByte()), this.hashAlgorithm.valueOf(), - new UnresolvedAddressDto(this.recipientAddress.encodeUnresolvedAddress(this.networkType)), this.getProofByte(), ); } diff --git a/test/model/transaction/SecretLockTransaction.spec.ts b/test/model/transaction/SecretLockTransaction.spec.ts index b58fe67047..56c7ce6e52 100644 --- a/test/model/transaction/SecretLockTransaction.spec.ts +++ b/test/model/transaction/SecretLockTransaction.spec.ts @@ -132,8 +132,8 @@ describe('SecretLockTransaction', () => { ); const signedTx = secretLockTransaction.signWith(account, generationHash); expect(signedTx.payload.substring(256, signedTx.payload.length)).to.be.equal( - '9B3155B37159DA50AA52D5967C509B410F5A36A3B1E31ECB5AC76675D79B4A5E44B262C46CEABB850' + - 'A000000000000006400000000000000009026D27E1D0A26CA4E316F901E23E55C8711DB20DF11A7B2', + '9026D27E1D0A26CA4E316F901E23E55C8711DB20DF11A7B29B3155B37159DA50AA52D5967C509B410' + + 'F5A36A3B1E31ECB5AC76675D79B4A5E44B262C46CEABB850A00000000000000640000000000000000', ); }); diff --git a/test/model/transaction/SecretProofTransaction.spec.ts b/test/model/transaction/SecretProofTransaction.spec.ts index 589ae0d030..7ad17698d2 100644 --- a/test/model/transaction/SecretProofTransaction.spec.ts +++ b/test/model/transaction/SecretProofTransaction.spec.ts @@ -202,8 +202,8 @@ describe('SecretProofTransaction', () => { const signedTx = secretProofTransaction.signWith(account, generationHash); expect(signedTx.payload.substring(256, signedTx.payload.length)).to.be.equal( - '9B3155B37159DA50AA52D5967C509B410F5A36A3B1E31ECB5AC76675D79B4A5E20000090D66C33420E5411995BACFCA2' + - 'B28CF1C9F5DD7AB1204EA4B778A39A3663719DFC5E48C9D78431B1E45C2AF9DF538782BF199C189DABEAC7', + '90D66C33420E5411995BACFCA2B28CF1C9F5DD7AB1204EA49B3155B37159DA50AA52D5967C509B410F5A36A3B1E31ECB5AC7667' + + '5D79B4A5E200000B778A39A3663719DFC5E48C9D78431B1E45C2AF9DF538782BF199C189DABEAC7', ); });