Skip to content

Commit 057d05d

Browse files
committed
Fixed a few merge issues
1 parent 7ecbc88 commit 057d05d

File tree

3 files changed

+3
-55
lines changed

3 files changed

+3
-55
lines changed

src/model/transaction/Transaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export abstract class Transaction {
211211
const commonTransactionObject = {
212212
type: this.type,
213213
networkType: this.networkType,
214-
version: this.version,
214+
version: this.versionToDTO(),
215215
maxFee: this.maxFee.toDTO(),
216216
deadline: this.deadline.toDTO(),
217217
signature: this.signature ? this.signature : '',

test/core/utils/TransactionMapping.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ describe('TransactionMapping - createFromPayload', () => {
219219

220220
const transaction = TransactionMapping.createFromPayload(signedTransaction.payload) as MosaicDefinitionTransaction;
221221

222-
expect(transaction.mosaicProperties.duration! .higher).to.be.equal(0);
223222
expect(transaction.mosaicProperties.divisibility).to.be.equal(3);
224223
expect(transaction.mosaicProperties.supplyMutable).to.be.equal(false);
225224
expect(transaction.mosaicProperties.transferable).to.be.equal(false);

test/infrastructure/SerializeTransactionToJSON.spec.ts

Lines changed: 2 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -213,59 +213,8 @@ describe('SerializeTransactionToJSON', () => {
213213

214214
const json = mosaicDefinitionTransaction.toJSON();
215215

216-
expect(json.type).to.be.equal(TransactionType.MOSAIC_DEFINITION);
217-
expect(json.mosaicProperties.supplyMutable).to.be.equal(false);
218-
expect(json.mosaicProperties.transferable).to.be.equal(false);
219-
expect(json.mosaicProperties.levyMutable).to.be.equal(false);
220-
expect(json.mosaicProperties.divisibility).to.be.equal(3);
221-
222-
});
223-
224-
it('should create MosaicDefinitionTransaction without duration', () => {
225-
const mosaicDefinitionTransaction = MosaicDefinitionTransaction.create(
226-
Deadline.create(),
227-
new MosaicNonce(new Uint8Array([0xE6, 0xDE, 0x84, 0xB8])), // nonce
228-
new MosaicId(UInt64.fromUint(1).toDTO()), // ID
229-
MosaicProperties.create({
230-
supplyMutable: false,
231-
transferable: false,
232-
levyMutable: false,
233-
divisibility: 3,
234-
}),
235-
NetworkType.MIJIN_TEST,
236-
);
237-
238-
const json = mosaicDefinitionTransaction.toJSON();
239-
240-
expect(json.type).to.be.equal(TransactionType.MOSAIC_DEFINITION);
241-
expect(json.mosaicProperties.supplyMutable).to.be.equal(false);
242-
expect(json.mosaicProperties.transferable).to.be.equal(false);
243-
expect(json.mosaicProperties.levyMutable).to.be.equal(false);
244-
expect(json.mosaicProperties.divisibility).to.be.equal(3);
245-
246-
});
247-
248-
it('should create MosaicDefinitionTransaction without duration', () => {
249-
const mosaicDefinitionTransaction = MosaicDefinitionTransaction.create(
250-
Deadline.create(),
251-
new MosaicNonce(new Uint8Array([0xE6, 0xDE, 0x84, 0xB8])), // nonce
252-
new MosaicId(UInt64.fromUint(1).toDTO()), // ID
253-
MosaicProperties.create({
254-
supplyMutable: false,
255-
transferable: false,
256-
levyMutable: false,
257-
divisibility: 3,
258-
}),
259-
NetworkType.MIJIN_TEST,
260-
);
261-
262-
const json = mosaicDefinitionTransaction.toJSON();
263-
264-
expect(json.type).to.be.equal(TransactionType.MOSAIC_DEFINITION);
265-
expect(json.mosaicProperties.supplyMutable).to.be.equal(false);
266-
expect(json.mosaicProperties.transferable).to.be.equal(false);
267-
expect(json.mosaicProperties.levyMutable).to.be.equal(false);
268-
expect(json.mosaicProperties.divisibility).to.be.equal(3);
216+
expect(json.transaction.type).to.be.equal(TransactionType.MOSAIC_DEFINITION);
217+
expect(json.transaction.properties.length).to.be.equal(2);
269218

270219
});
271220

0 commit comments

Comments
 (0)