Skip to content

Commit

Permalink
fix: updated status fields
Browse files Browse the repository at this point in the history
  • Loading branch information
nada-deriv committed Aug 22, 2023
1 parent f1387c9 commit 3ffa6c7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ type TPrivateSocketEndpoints = {
/**
* The status code of the transaction.
* Possible values for **deposit:** `PENDING|CONFIRMED|ERROR`,
* possible values for **withdrawal:** `LOCKED|VERIFIED|REJECTED|PERFORMING_BLOCKCHAIN_TXN|PROCESSING|SENT|ERROR|CANCELLED`.
* possible values for **withdrawal:** `LOCKED|VERIFIED|REJECTED|PERFORMING_BLOCKCHAIN_TXN|PROCESSING|SENT|ERROR|CANCELLED|REVERTING|REVERTED`.
*/
status_code:
| 'CANCELLED'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ const cryptoTransactionMapper = (
PERFORMING_BLOCKCHAIN_TXN: 'warning',
PROCESSING: 'warning',
REJECTED: 'unsuccessful',
REVERTED: 'unsuccessful',
REVERTING: 'warning',
SENT: 'successful',
VERIFIED: 'warning',
} as const;
Expand All @@ -57,6 +59,8 @@ const cryptoTransactionMapper = (
PERFORMING_BLOCKCHAIN_TXN: localize('In process'),
PROCESSING: localize('In process'),
REJECTED: localize('Unsuccessful'),
REVERTED: localize('Unsuccessful'),
REVERTING: localize('In process'),
SENT: localize('Successful'),
VERIFIED: localize('In process'),
} as const;
Expand All @@ -79,6 +83,8 @@ const cryptoTransactionMapper = (
PERFORMING_BLOCKCHAIN_TXN: localize('We’re sending your request to the blockchain.'),
PROCESSING: localize('We’re awaiting confirmation from the blockchain.'),
REJECTED: localize("Your withdrawal is unsuccessful. We've sent you an email with more information."),
REVERTED: localize("Your withdrawal is unsuccessful. We've sent you an email with more information."),
REVERTING: localize("We're processing your withdrawal."),
SENT: localize('Your withdrawal is successful.'),
VERIFIED: localize('We’re processing your withdrawal.'),
} as const;
Expand All @@ -96,6 +102,8 @@ const cryptoTransactionMapper = (
PERFORMING_BLOCKCHAIN_TXN: transaction_hash_obscure,
PROCESSING: transaction_hash_obscure,
REJECTED: localize('NA'),
REVERTED: localize('NA'),
REVERTING: transaction_hash_obscure,
SENT: transaction_hash_obscure,
VERIFIED: transaction_hash_obscure,
} as const;
Expand All @@ -113,6 +121,8 @@ const cryptoTransactionMapper = (
PERFORMING_BLOCKCHAIN_TXN: '-',
PROCESSING: '-',
REJECTED: '-',
REVERTED: '-',
REVERTING: '-',
SENT: '-',
VERIFIED: '-',
} as const;
Expand Down

0 comments on commit 3ffa6c7

Please sign in to comment.