fix types

This commit is contained in:
Mayukha Vadari
2023-05-01 10:34:41 -04:00
parent 63ce4624ca
commit 49b4387e09
2 changed files with 10 additions and 4 deletions

View File

@@ -68,7 +68,7 @@ export interface XChainAddAccountCreateAttestation extends BaseTransaction {
/**
* The counter that represents the order that the claims must be processed in.
*/
XChainAccountCreateCount: string
XChainAccountCreateCount: number | string
/**
* The bridge associated with the attestation.
@@ -202,7 +202,10 @@ export function validateXChainAddAccountCreateAttestation(
)
}
if (typeof tx.XChainAccountCreateCount !== 'string') {
if (
typeof tx.XChainAccountCreateCount !== 'string' &&
typeof tx.XChainAccountCreateCount !== 'number'
) {
throw new ValidationError(
'XChainAddAccountCreateAttestation: invalid field XChainAccountCreateCount',
)

View File

@@ -68,7 +68,7 @@ export interface XChainAddClaimAttestation extends BaseTransaction {
* The XChainClaimID associated with the transfer, which was included in the
* {@link XChainCommit} transaction.
*/
XChainClaimID: string
XChainClaimID: number | string
}
/**
@@ -187,7 +187,10 @@ export function validateXChainAddClaimAttestation(
)
}
if (typeof tx.XChainClaimID !== 'string') {
if (
typeof tx.XChainClaimID !== 'string' &&
typeof tx.XChainClaimID !== 'number'
) {
throw new ValidationError(
'XChainAddClaimAttestation: invalid field XChainClaimID',
)