mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
refactor: Define PaymentTransaction model (#1542)
- Defines a TypeScript type for PaymentTransaction - Provides an optional function to users for verifying a PaymentTransaction instance at runtime: verifyPaymentTransaction() - Adds tests for verifyPaymentTransaction() - Adds isFlagEnabled() util to be used for models
This commit is contained in:
committed by
Mayukha Vadari
parent
c1edab547a
commit
bec487cf71
@@ -103,21 +103,6 @@ describe('Transaction Verification', function () {
|
||||
)
|
||||
})
|
||||
|
||||
it (`Handles invalid Flags`, () => {
|
||||
const invalidFlags = {
|
||||
Account: "r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe",
|
||||
TransactionType: "Payment",
|
||||
Flags: "1000"
|
||||
} as any
|
||||
|
||||
|
||||
assert.throws(
|
||||
() => verifyBaseTransaction(invalidFlags),
|
||||
ValidationError,
|
||||
"BaseTransaction: invalid Flags"
|
||||
)
|
||||
})
|
||||
|
||||
it (`Handles invalid LastLedgerSequence`, () => {
|
||||
const invalidLastLedgerSequence = {
|
||||
Account: "r97KeayHuEsDwyU1yPBVtMLLoQr79QcRFe",
|
||||
|
||||
Reference in New Issue
Block a user