update docstrings

This commit is contained in:
Denis Angell
2023-02-15 13:04:22 -05:00
parent 1ef14433b7
commit cbac35ab43
3 changed files with 9 additions and 9 deletions

View File

@@ -31,8 +31,8 @@ export enum PaymentChannelClaimFlags {
* the channel to the close time of the previous ledger plus the channel's
* SettleDelay time, unless the channel already has an earlier Expiration
* time.) If the destination address uses this flag when the channel still
* holds an amount, any amount that remains after processing the claim is returned to
* the source address.
* holds an amount, any amount that remains after processing the claim is
* returned to the source address.
*/
tfClose = 0x00020000,
}
@@ -91,8 +91,8 @@ export interface PaymentChannelClaimFlagsInterface extends GlobalFlags {
* the channel to the close time of the previous ledger plus the channel's
* SettleDelay time, unless the channel already has an earlier Expiration
* time.) If the destination address uses this flag when the channel still
* holds an amount, any amount that remains after processing the claim is returned to
* the source address.
* holds an amount, any amount that remains after processing the claim is
* returned to the source address.
*/
tfClose?: boolean
}
@@ -118,7 +118,7 @@ export interface PaymentChannelClaim extends BaseTransaction {
/**
* The amount authorized by the Signature. This must match the amount in the
* signed message. This is the cumulative amount that can be dispensed by the
* channel, including amounts previously redeemed.
* channel, including amounts previously redeemed. Required unless closing the channel.
*/
Amount?: Amount
/**
@@ -154,11 +154,11 @@ export function validatePaymentChannelClaim(tx: Record<string, unknown>): void {
}
if (tx.Balance !== undefined && !isAmount(tx.Balance)) {
throw new ValidationError('PaymentChannelClaim: invalid Balance')
throw new ValidationError('PaymentChannelClaim: Balance must be an Amount')
}
if (tx.Amount !== undefined && !isAmount(tx.Amount)) {
throw new ValidationError('PaymentChannelClaim: invalid Amount')
throw new ValidationError('PaymentChannelClaim: Amount must be an Amount')
}
if (tx.Signature !== undefined && typeof tx.Signature !== 'string') {

View File

@@ -67,7 +67,7 @@ export function validatePaymentChannelCreate(
}
if (typeof tx.Amount !== 'string' && !isAmount(tx.Amount)) {
throw new ValidationError('PaymentChannelCreate: invalid Amount')
throw new ValidationError('PaymentChannelCreate: Amount must be an Amount')
}
if (tx.Destination === undefined) {

View File

@@ -56,7 +56,7 @@ export function validatePaymentChannelFund(tx: Record<string, unknown>): void {
}
if (typeof tx.Amount !== 'string' && !isAmount(tx.Amount)) {
throw new ValidationError('PaymentChannelFund: invalid Amount')
throw new ValidationError('PaymentChannelFund: Amount must be an Amount')
}
if (tx.Expiration !== undefined && typeof tx.Expiration !== 'number') {