Skip to content

Commit c2dd2ed

Browse files
authored
Update custom Payment to a higher number in binary codec test (#2824)
* update payment custom def * comment
1 parent c920733 commit c2dd2ed

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

packages/ripple-binary-codec/test/signing-data-encoding.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ describe('Signing data', function () {
7373
const customPaymentDefinitions = JSON.parse(
7474
JSON.stringify(normalDefinitions),
7575
)
76-
customPaymentDefinitions.TRANSACTION_TYPES.Payment = 31
76+
77+
// custom number would need to updated in case it has been used by an existing transaction type
78+
customPaymentDefinitions.TRANSACTION_TYPES.Payment = 200
7779

7880
const newDefs = new XrplDefinitions(customPaymentDefinitions)
7981
const actual = encodeForSigning(tx_json, newDefs)
@@ -82,7 +84,7 @@ describe('Signing data', function () {
8284
'53545800', // signingPrefix
8385
// TransactionType
8486
'12',
85-
'001F',
87+
'00C8',
8688
// Flags
8789
'22',
8890
'80000000',
@@ -176,7 +178,9 @@ describe('Signing data', function () {
176178
const customPaymentDefinitions = JSON.parse(
177179
JSON.stringify(normalDefinitions),
178180
)
179-
customPaymentDefinitions.TRANSACTION_TYPES.Payment = 31
181+
182+
// custom number would need to updated in case it has been used by an existing transaction type
183+
customPaymentDefinitions.TRANSACTION_TYPES.Payment = 200
180184

181185
const newDefs = new XrplDefinitions(customPaymentDefinitions)
182186
const signingAccount = 'rJZdUusLDtY9NEsGea7ijqhVrXv98rYBYN'
@@ -187,7 +191,7 @@ describe('Signing data', function () {
187191
'534D5400', // signingPrefix
188192
// TransactionType
189193
'12',
190-
'001F',
194+
'00C8',
191195
// Flags
192196
'22',
193197
'80000000',

0 commit comments

Comments
 (0)