Skip to content

Commit 4cab9e6

Browse files
committed
Applied catbuffer on aggregate transaction
1 parent 37f4eb0 commit 4cab9e6

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

src/model/transaction/AggregateTransaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,6 @@ export class AggregateTransaction extends Transaction {
267267
* @returns {Uint8Array}
268268
*/
269269
protected generateEmbeddedBytes(): Uint8Array {
270-
throw new Error('Not implemented');
270+
throw new Error('Method not implemented');
271271
}
272272
}

src/model/transaction/MosaicDefinitionTransaction.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,8 @@ export class MosaicDefinitionTransaction extends Transaction {
205205
* @returns {Uint8Array}
206206
*/
207207
protected generateEmbeddedBytes(): Uint8Array {
208-
const signerBuffer = new Uint8Array(32);
209-
210208
const transactionBuilder = new EmbeddedMosaicDefinitionTransactionBuilder(
211-
new KeyDto(signerBuffer),
209+
new KeyDto(Convert.hexToUint8(this.signer!.publicKey)),
212210
this.versionToDTO(),
213211
TransactionType.MOSAIC_DEFINITION.valueOf(),
214212
new MosaicNonceDto(this.getMosaicNonceIntValue()),

src/model/transaction/MosaicSupplyChangeTransaction.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import { Transaction } from './Transaction';
3232
import { TransactionInfo } from './TransactionInfo';
3333
import { TransactionType } from './TransactionType';
3434
import { TransactionVersion } from './TransactionVersion';
35+
import { Convert } from '../../core/format';
3536

3637
/**
3738
* In case a mosaic has the flag 'supplyMutable' set to true, the creator of the mosaic can change the supply,

src/model/transaction/TransferTransaction.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,8 @@ export class TransferTransaction extends Transaction {
230230
* @returns {Uint8Array}
231231
*/
232232
protected generateEmbeddedBytes(): Uint8Array {
233-
const signerBuffer = new Uint8Array(32);
234233
const transactionBuilder = new EmbeddedTransferTransactionBuilder(
235-
new KeyDto(signerBuffer),
234+
new KeyDto(Convert.hexToUint8(this.signer!.publicKey)),
236235
this.versionToDTO(),
237236
TransactionType.TRANSFER.valueOf(),
238237
new UnresolvedAddressDto(RawAddress.stringToAddress(this.recipientToString())),

test/model/transaction/AggregateTransaction.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ describe('AggregateTransaction', () => {
106106
NetworkType.MIJIN_TEST,
107107
[]);
108108

109-
const signedTransaction = aggregateTransaction.signWith(account, generationHash);
109+
const signedTransaction = aggregateTransaction.signWithCatbuffer(account, generationHash);
110110

111111
expect(signedTransaction.payload.substring(0, 8)).to.be.equal('CD000000');
112112
expect(signedTransaction.payload.substring(240, 256)).to.be.equal('5100000051000000');

0 commit comments

Comments
 (0)