allow lowercase hex values for NFTokenMint.URI (#2008)

This commit is contained in:
Omar Khan
2022-05-31 19:22:05 -04:00
committed by GitHub
parent 42ea7d83bc
commit 6c3f5a0e3a
6 changed files with 104 additions and 3 deletions

View File

@@ -66,4 +66,24 @@ describe('NFTokenMint', function () {
'NFTokenMint: Issuer must not be equal to Account',
)
})
it(`throws w/ URI not in hex format`, function () {
const invalid = {
TransactionType: 'NFTokenMint',
Account: 'rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm',
Fee: '5000000',
Sequence: 2470665,
Flags: NFTokenMintFlags.tfTransferable,
NFTokenTaxon: 0,
Issuer: 'r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ',
TransferFee: 1,
URI: 'http://xrpl.org',
} as any
assert.throws(
() => validate(invalid),
ValidationError,
'NFTokenMint: URI must be in hex format',
)
})
})