From c2dd2edbcccaed7f8071b8d06f3303b1f8f602e7 Mon Sep 17 00:00:00 2001 From: Shawn Xie <35279399+shawnxie999@users.noreply.github.com> Date: Mon, 18 Nov 2024 17:34:12 -0500 Subject: [PATCH] Update custom Payment to a higher number in binary codec test (#2824) * update payment custom def * comment --- .../test/signing-data-encoding.test.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/ripple-binary-codec/test/signing-data-encoding.test.ts b/packages/ripple-binary-codec/test/signing-data-encoding.test.ts index 881f8132..22bab766 100644 --- a/packages/ripple-binary-codec/test/signing-data-encoding.test.ts +++ b/packages/ripple-binary-codec/test/signing-data-encoding.test.ts @@ -73,7 +73,9 @@ describe('Signing data', function () { const customPaymentDefinitions = JSON.parse( JSON.stringify(normalDefinitions), ) - customPaymentDefinitions.TRANSACTION_TYPES.Payment = 31 + + // custom number would need to updated in case it has been used by an existing transaction type + customPaymentDefinitions.TRANSACTION_TYPES.Payment = 200 const newDefs = new XrplDefinitions(customPaymentDefinitions) const actual = encodeForSigning(tx_json, newDefs) @@ -82,7 +84,7 @@ describe('Signing data', function () { '53545800', // signingPrefix // TransactionType '12', - '001F', + '00C8', // Flags '22', '80000000', @@ -176,7 +178,9 @@ describe('Signing data', function () { const customPaymentDefinitions = JSON.parse( JSON.stringify(normalDefinitions), ) - customPaymentDefinitions.TRANSACTION_TYPES.Payment = 31 + + // custom number would need to updated in case it has been used by an existing transaction type + customPaymentDefinitions.TRANSACTION_TYPES.Payment = 200 const newDefs = new XrplDefinitions(customPaymentDefinitions) const signingAccount = 'rJZdUusLDtY9NEsGea7ijqhVrXv98rYBYN' @@ -187,7 +191,7 @@ describe('Signing data', function () { '534D5400', // signingPrefix // TransactionType '12', - '001F', + '00C8', // Flags '22', '80000000',