Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions app/_locales/en_GB/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,28 @@ export const ERROR_MESSAGE_MAP: Partial<
[SUBMIT_CLAIM_ERROR_CODES.FIELD_REQUIRED]: {
messageKey: 'shieldClaimInvalidRequired',
},
[SUBMIT_CLAIM_ERROR_CODES.SIGNATURE_COVERAGE_NOT_COVERED]: {
messageKey: 'shieldClaimSignatureCoverageNotCovered',
},
[SUBMIT_CLAIM_ERROR_CODES.SIGNATURE_VERIFICATION_FAILED]: {
messageKey: 'shieldClaimWalletOwnershipValidationFailed',
},
[SUBMIT_CLAIM_ERROR_CODES.CHAIN_NOT_SUPPORTED]: {
messageKey: 'shieldClaimChainNotSupported',
field: SUBMIT_CLAIM_FIELDS.CHAIN_ID,
},
[SUBMIT_CLAIM_ERROR_CODES.TRANSACTION_NOT_FOUND]: {
messageKey: 'shieldClaimTransactionNotFound',
field: SUBMIT_CLAIM_FIELDS.IMPACTED_TRANSACTION_HASH,
},
[SUBMIT_CLAIM_ERROR_CODES.TRANSACTION_NOT_FROM_WALLET_ADDRESS]: {
messageKey: 'shieldClaimTransactionNotFromWalletAddress',
field: SUBMIT_CLAIM_FIELDS.IMPACTED_TRANSACTION_HASH,
},
[SUBMIT_CLAIM_ERROR_CODES.TRANSACTION_NOT_SUCCESSFUL]: {
messageKey: 'shieldClaimTransactionNotSuccessful',
field: SUBMIT_CLAIM_FIELDS.IMPACTED_TRANSACTION_HASH,
},
};

// Error codes for fields in the error response
Expand Down
8 changes: 8 additions & 0 deletions ui/pages/settings/transaction-shield-tab/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ export const SUBMIT_CLAIM_ERROR_CODES = {
SUBMISSION_WINDOW_EXPIRED: 'E103',
TRANSACTION_NOT_COVERED: 'E104',
COVERAGE_VALIDATION_FAILED: 'E105',
SIGNATURE_COVERAGE_NOT_COVERED: 'E106',

// Claims Validation (E200-E299)
CLAIM_VALIDATION_FAILED: 'E201',
MAX_CLAIMS_LIMIT_EXCEEDED: 'E202',
DUPLICATE_CLAIM_EXISTS: 'E203',
INVALID_WALLET_ADDRESSES: 'E204',
SIGNATURE_VERIFICATION_FAILED: 'E205',

// Field Validation Errors (E250-E299)
FIELD_REQUIRED: 'E250',
Expand All @@ -69,6 +71,12 @@ export const SUBMIT_CLAIM_ERROR_CODES = {
FILES_SIZE_EXCEEDED: 'E301',
FILES_COUNT_EXCEEDED: 'E302',
INVALID_FILES_TYPE: 'E303',

// Chains (E400-E499)
CHAIN_NOT_SUPPORTED: 'E401',
TRANSACTION_NOT_FOUND: 'E402',
TRANSACTION_NOT_FROM_WALLET_ADDRESS: 'E403',
TRANSACTION_NOT_SUCCESSFUL: 'E404',
} as const;

export type SubmitClaimErrorCode =
Expand Down
Loading