Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
chore: add validation error types
Browse files Browse the repository at this point in the history
  • Loading branch information
xstelea committed Feb 22, 2023
1 parent fe85733 commit 234ba75
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/IO/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export const ErrorTypeSchema = union([
literal('submittedTransactionWasDuplicate'),
literal('submittedTransactionHasFailedTransactionStatus'),
literal('submittedTransactionHasRejectedTransactionStatus'),
literal('wrongAccountType'),
literal('unknownWebsite'),
literal('radixJsonNotFound'),
literal('unknownDappDefinitionAddress'),
])

const AccountSchema = object({
Expand Down
4 changes: 4 additions & 0 deletions lib/helpers/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ export const errorType = {
'submittedTransactionHasRejectedTransactionStatus',
failedToFindAccountWithEnoughFundsToLockFee:
'failedToFindAccountWithEnoughFundsToLockFee',
wrongAccountType: 'wrongAccountType',
unknownWebsite: 'unknownWebsite',
radixJsonNotFound: 'radixJsonNotFound',
unknownDappDefinitionAddress: 'unknownDappDefinitionAddress',
} as const

type ErrorType = keyof typeof errorType
Expand Down

0 comments on commit 234ba75

Please sign in to comment.