Skip to content

Commit

Permalink
pacify the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
ckeshava committed Feb 3, 2025
1 parent 1311219 commit 6d7905f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
10 changes: 7 additions & 3 deletions packages/xrpl/src/models/ledger/PermissionedDomain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ import { BaseLedgerEntry, HasPreviousTxnID } from './BaseLedgerEntry'
export default interface PermissionedDomain
extends BaseLedgerEntry,
HasPreviousTxnID {
/*The ledger object's type (PermissionedDomain). */
/* The ledger object's type (PermissionedDomain). */
LedgerEntryType: 'PermissionedDomain'

/* The account that controls the settings of the domain. */
Owner: string

/* The credentials that are accepted by the domain. Ownership of one of these credentials automatically makes you a member of the domain. */
/* The credentials that are accepted by the domain.
Ownership of one of these credentials automatically
makes you a member of the domain. */
AcceptedCredentials: AuthorizeCredential[]

/* Flag values associated with this object. */
Expand All @@ -20,6 +22,8 @@ export default interface PermissionedDomain
/* Owner account's directory page containing the PermissionedDomain object. */
OwnerNode: string

/* The Sequence value of the PermissionedDomainSet transaction that created this domain. Used in combination with the Account to identify this domain. */
/* The Sequence value of the PermissionedDomainSet
transaction that created this domain. Used in combination
with the Account to identify this domain. */
Sequence: number
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export interface PermissionedDomainSet extends BaseTransaction {
/* The domain to modify. Must be included if modifying an existing domain. */
DomainID?: string

/* The credentials that are accepted by the domain. Ownership of one of these credentials automatically makes you a member of the domain. An empty array means deleting the field. */
/* The credentials that are accepted by the domain. Ownership of one
of these credentials automatically makes you a member of the domain.
An empty array means deleting the field. */
AcceptedCredentials: AuthorizeCredential[]
}

Expand Down
12 changes: 2 additions & 10 deletions packages/xrpl/test/models/permissionedDomainSet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,15 @@ describe('PermissionedDomainSet', function () {
// DomainID is expected to be a string
tx.DomainID = 1234
const errorMessage = 'PermissionedDomainSet: invalid field DomainID'
assert.throws(
() => validate(tx),
ValidationError,
errorMessage,
)
assert.throws(() => validate(tx), ValidationError, errorMessage)
assert.throws(() => validate(tx), ValidationError, errorMessage)
})

it(`throws w/ missing field AcceptedCredentials`, function () {
delete tx.AcceptedCredentials
const errorMessage =
'PermissionedDomainSet: missing field AcceptedCredentials'
assert.throws(
() => validate(tx),
ValidationError,
errorMessage,
)
assert.throws(() => validate(tx), ValidationError, errorMessage)
assert.throws(() => validate(tx), ValidationError, errorMessage)
})

Expand Down

0 comments on commit 6d7905f

Please sign in to comment.