From e4d13e8b96e6fdd11b7e648dc14a8af9363f4ff7 Mon Sep 17 00:00:00 2001 From: Mayukha Vadari Date: Tue, 31 May 2022 17:11:01 -0400 Subject: [PATCH] add transactions to validate list --- .../src/models/transactions/transaction.ts | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/packages/xrpl/src/models/transactions/transaction.ts b/packages/xrpl/src/models/transactions/transaction.ts index e5a26b8f49..ec52678c5d 100644 --- a/packages/xrpl/src/models/transactions/transaction.ts +++ b/packages/xrpl/src/models/transactions/transaction.ts @@ -50,6 +50,13 @@ import { SetRegularKey, validateSetRegularKey } from './setRegularKey' import { SignerListSet, validateSignerListSet } from './signerListSet' import { TicketCreate, validateTicketCreate } from './ticketCreate' import { TrustSet, validateTrustSet } from './trustSet' +import { XChainClaim, validateXChainClaim } from './xChainClaim' +import { XChainDoorCreate, validateXChainDoorCreate } from './xChainDoorCreate' +import { + XChainSeqNumCreate, + validateXChainSeqNumCreate, +} from './xChainSeqNumCreate' +import { XChainTransfer, validateXChainTransfer } from './xChainTransfer' /** * @category Transaction Models @@ -79,6 +86,10 @@ export type Transaction = | SignerListSet | TicketCreate | TrustSet + | XChainClaim + | XChainDoorCreate + | XChainSeqNumCreate + | XChainTransfer /** * @category Transaction Models @@ -203,6 +214,22 @@ export function validate(transaction: Record): void { validateTrustSet(tx) break + case 'XChainClaim': + validateXChainClaim(tx) + break + + case 'XChainDoorCreate': + validateXChainDoorCreate(tx) + break + + case 'XChainSeqNumCreate': + validateXChainSeqNumCreate(tx) + break + + case 'XChainTransfer': + validateXChainTransfer(tx) + break + default: throw new ValidationError( `Invalid field TransactionType: ${tx.TransactionType}`,