Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/model/transaction/SecretLockTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand All @@ -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)),
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/model/transaction/SecretProofTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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(),
);
}
Expand Down
4 changes: 2 additions & 2 deletions test/model/transaction/SecretLockTransaction.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
);
});

Expand Down
4 changes: 2 additions & 2 deletions test/model/transaction/SecretProofTransaction.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
);
});

Expand Down