Skip to content

Commit 46274f5

Browse files
committed
Updated metadata e2e tests with string value
fixed metadata transaction mapper
1 parent 46a482f commit 46274f5

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

e2e/infrastructure/MetadataHttp.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ describe('MetadataHttp', () => {
163163
Deadline.create(),
164164
account.publicKey,
165165
UInt64.fromUint(5),
166-
10,
167-
Convert.uint8ToUtf8(new Uint8Array(10)),
166+
23,
167+
`Test account meta value`,
168168
NetworkType.MIJIN_TEST,
169169
);
170170

@@ -201,8 +201,8 @@ describe('MetadataHttp', () => {
201201
account.publicKey,
202202
UInt64.fromUint(5),
203203
mosaicId,
204-
10,
205-
Convert.uint8ToUtf8(new Uint8Array(10)),
204+
22,
205+
`Test mosaic meta value`,
206206
NetworkType.MIJIN_TEST,
207207
);
208208

@@ -239,8 +239,8 @@ describe('MetadataHttp', () => {
239239
account.publicKey,
240240
UInt64.fromUint(5),
241241
namespaceId,
242-
10,
243-
Convert.uint8ToUtf8(new Uint8Array(10)),
242+
25,
243+
`Test namespace meta value`,
244244
NetworkType.MIJIN_TEST,
245245
);
246246

src/infrastructure/transaction/CreateTransactionFromDTO.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
385385
transactionDTO.targetPublicKey,
386386
UInt64.fromNumericString(transactionDTO.scopedMetadataKey),
387387
transactionDTO.valueSizeDelta,
388-
convert.decodeHex(transactionDTO.value),
388+
transactionDTO.value,
389389
transactionDTO.signature,
390390
transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey,
391391
extractNetworkType(transactionDTO.version)) : undefined,
@@ -401,7 +401,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
401401
UInt64.fromNumericString(transactionDTO.scopedMetadataKey),
402402
new MosaicId(transactionDTO.targetMosaicId),
403403
transactionDTO.valueSizeDelta,
404-
convert.decodeHex(transactionDTO.value),
404+
transactionDTO.value,
405405
transactionDTO.signature,
406406
transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey,
407407
extractNetworkType(transactionDTO.version)) : undefined,
@@ -417,7 +417,7 @@ const CreateStandaloneTransactionFromDTO = (transactionDTO, transactionInfo): Tr
417417
UInt64.fromNumericString(transactionDTO.scopedMetadataKey),
418418
NamespaceId.createFromEncoded(transactionDTO.targetNamespaceId),
419419
transactionDTO.valueSizeDelta,
420-
convert.decodeHex(transactionDTO.value),
420+
transactionDTO.value,
421421
transactionDTO.signature,
422422
transactionDTO.signerPublicKey ? PublicAccount.createFromPublicKey(transactionDTO.signerPublicKey,
423423
extractNetworkType(transactionDTO.version)) : undefined,

0 commit comments

Comments
 (0)