fix: update zetachain enum values to match package type definitions

PascalCase enum values (PendingOutbound, OutboundMined, etc.) instead
of SCREAMING_SNAKE_CASE (PENDING_OUTBOUND, OUTBOUND_MINED, etc.) to
match the actual @luxfi/zetachain-cctx-types package exports.
This commit is contained in:
Zach Kelling
2026-03-02 12:53:59 -08:00
parent d15691316a
commit 535b0522d8
12 changed files with 78 additions and 78 deletions
+35 -35
View File
@@ -2,8 +2,8 @@ import * as zetaChainCCTXType from '@luxfi/zetachain-cctx-types';
export const zetaChainCCTXItem: zetaChainCCTXType.CctxListItem = {
index: '0xaea405aa63353312727dcc471e3242d3b8de0a181d6e35fe905fff4084bd3cc1',
status: zetaChainCCTXType.CctxStatus.PENDING_OUTBOUND,
status_reduced: zetaChainCCTXType.CctxStatusReduced.PENDING,
status: zetaChainCCTXType.CctxStatus.PendingOutbound,
status_reduced: zetaChainCCTXType.CctxStatusReduced.Pending,
amount: '185354164223052',
source_chain_id: 7001,
target_chain_id: 11155111,
@@ -12,7 +12,7 @@ export const zetaChainCCTXItem: zetaChainCCTXType.CctxListItem = {
sender_address: '0xbE8b5d82DDE00677cCdb9dc22071CF635d459223',
receiver_address: '0xcd54C6C6daEF72B04747F10A853a10c9Bef63286',
asset: '0x1234567890123456789012345678901234567890',
coin_type: zetaChainCCTXType.CoinType.ERC20,
coin_type: zetaChainCCTXType.CoinType.Erc20,
token_symbol: 'USDT.ARBSEP',
};
@@ -21,14 +21,14 @@ export const zetaChainCCTX: zetaChainCCTXType.CrossChainTx = {
index: '0x1c1e7410d7dfefe6173cc11efa47221e85587d3831c69108121198e0b2a86657',
zeta_fees: '0',
relayed_message: '0x0000000000000000000000000000000000000000000000000000000000000000',
cctx_status_reduced: zetaChainCCTXType.CctxStatusReduced.SUCCESS,
cctx_status_reduced: zetaChainCCTXType.CctxStatusReduced.Success,
token_symbol: 'USDT.ARBSEP',
token_name: 'USDT.ARBSEP',
zrc20_contract_address: '0x1234567890123456789012345678901234567890',
icon_url: 'https://example.com/icon.png',
decimals: 6,
cctx_status: {
status: zetaChainCCTXType.CctxStatus.OUTBOUND_MINED,
status: zetaChainCCTXType.CctxStatus.OutboundMined,
status_message: '',
error_message: '',
last_update_timestamp: 1641139818,
@@ -41,23 +41,23 @@ export const zetaChainCCTX: zetaChainCCTXType.CrossChainTx = {
sender: '0x44D1F1f9289DBA1Cf5824bd667184cEBE020aA1c',
sender_chain_id: 7001,
tx_origin: '0xcf558D29999C119425d28bF1c07ba97FfF39e387',
coin_type: zetaChainCCTXType.CoinType.GAS,
coin_type: zetaChainCCTXType.CoinType.Gas,
asset: '',
amount: '434880247204065094',
observed_hash: '0x0001150419abd8d8383fae702f3a8415e57c96e78c9815756d15e1f1f5c0f466',
observed_external_height: 1345648,
ballot_index: '0x1c1e7410d7dfefe6173cc11efa47221e85587d3831c69108121198e0b2a86657',
finalized_zeta_height: 0,
tx_finalization_status: zetaChainCCTXType.TxFinalizationStatus.NOT_FINALIZED,
tx_finalization_status: zetaChainCCTXType.TxFinalizationStatus.NotFinalized,
is_cross_chain_call: false,
status: zetaChainCCTXType.InboundStatus.INBOUND_SUCCESS,
status: zetaChainCCTXType.InboundStatus.SUCCESS,
confirmation_mode: zetaChainCCTXType.ConfirmationMode.SAFE,
},
outbound_params: [
{
receiver: '0xcf558D29999C119425d28bF1c07ba97FfF39e387',
receiver_chain_id: 11155111,
coin_type: zetaChainCCTXType.CoinType.GAS,
coin_type: zetaChainCCTXType.CoinType.Gas,
amount: '434880247204065094',
tss_nonce: 62305,
gas_limit: 21000,
@@ -70,7 +70,7 @@ export const zetaChainCCTX: zetaChainCCTXType.CrossChainTx = {
effective_gas_price: '0',
effective_gas_limit: 0,
tss_pubkey: '',
tx_finalization_status: zetaChainCCTXType.TxFinalizationStatus.NOT_FINALIZED,
tx_finalization_status: zetaChainCCTXType.TxFinalizationStatus.NotFinalized,
call_options: {
gas_limit: 0,
is_arbitrary_call: false,
@@ -84,14 +84,14 @@ export const zetaChainCCTX: zetaChainCCTXType.CrossChainTx = {
index: '0x0001150419abd8d8383fae702f3a8415e57c96e78c9815756d15e1f1f5c0f466',
depth: 0,
source_chain_id: 7001,
status: zetaChainCCTXType.CctxStatus.OUTBOUND_MINED,
status: zetaChainCCTXType.CctxStatus.OutboundMined,
inbound_amount: '100000000000000000',
inbound_coin_type: zetaChainCCTXType.CoinType.GAS,
inbound_coin_type: zetaChainCCTXType.CoinType.Gas,
created_timestamp: 0,
outbound_params: [
{ amount: '0', chain_id: 7001, coin_type: zetaChainCCTXType.CoinType.GAS, gas_used: 0 },
{ amount: '0', chain_id: 7001, coin_type: zetaChainCCTXType.CoinType.Gas, gas_used: 0 },
],
status_reduced: zetaChainCCTXType.CctxStatusReduced.SUCCESS,
status_reduced: zetaChainCCTXType.CctxStatusReduced.Success,
},
],
};
@@ -102,13 +102,13 @@ export const zetaChainCCTXFailed: zetaChainCCTXType.CrossChainTx = {
zeta_fees: '0',
// eslint-disable-next-line max-len
relayed_message: '00000000000000000000000000000000000000000000000000000000000000400000000000000000000000006b513b40ebc0b4d7b197730476ed3324346f28220000000000000000000000000000000000000000000000000000000000000014dcbfa87533a478743b3f507e76170ea6f26fa69a000000000000000000000000',
cctx_status_reduced: zetaChainCCTXType.CctxStatusReduced.FAILED,
cctx_status_reduced: zetaChainCCTXType.CctxStatusReduced.Failed,
token_symbol: 'UPKRW.SEPOLIA',
token_name: 'ZetaChain ZRC20 UPKRW on Sepolia',
zrc20_contract_address: '0xA614Aebf7924A3Eb4D066aDCA5595E4980407f1d',
decimals: 6,
cctx_status: {
status: zetaChainCCTXType.CctxStatus.REVERTED,
status: zetaChainCCTXType.CctxStatus.Reverted,
status_message: '',
// eslint-disable-next-line max-len
error_message: '{"type":"contract_call_error","message":"contract call failed when calling EVM with data","error":"execution reverted: ret 0x: evm transaction execution failed","method":"depositAndCall0","contract":"0x6c533f7fE93fAE114d0954697069Df33C9B74fD7","args":"[{[220 191 168 117 51 164 120 116 59 63 80 126 118 23 14 166 242 111 166 154] 0xDCbFA87533A478743B3f507e76170eA6F26FA69a 43113} 0xE8d7796535F1cd63F0fe8D631E68eACe6839869B 10000000 0xDCbFA87533A478743B3f507e76170eA6F26FA69a [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 64 0 0 0 0 0 0 0 0 0 0 0 0 107 81 59 64 235 192 180 215 177 151 115 4 118 237 51 36 52 111 40 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 20 220 191 168 117 51 164 120 116 59 63 80 126 118 23 14 166 242 111 166 154 0 0 0 0 0 0 0 0 0 0 0 0]]"}',
@@ -122,23 +122,23 @@ export const zetaChainCCTXFailed: zetaChainCCTXType.CrossChainTx = {
sender: '0xDCbFA87533A478743B3f507e76170eA6F26FA69a',
sender_chain_id: 7001,
tx_origin: '0xDCbFA87533A478743B3f507e76170eA6F26FA69a',
coin_type: zetaChainCCTXType.CoinType.ERC20,
coin_type: zetaChainCCTXType.CoinType.Erc20,
asset: '0x6B513B40eBc0B4D7B197730476ed3324346F2822',
amount: '10000000',
observed_hash: '0x8ecc5913b637b2756258e8155e2b22dc5afa820698163c1627d372e187e6e65b',
observed_external_height: 45237981,
ballot_index: '0x004d60b58cbbead6ddc0a100e17b88484f72e4f47b10c4b560a41cadd3315c4c',
finalized_zeta_height: 12324831,
tx_finalization_status: zetaChainCCTXType.TxFinalizationStatus.EXECUTED,
tx_finalization_status: zetaChainCCTXType.TxFinalizationStatus.Executed,
is_cross_chain_call: true,
status: zetaChainCCTXType.InboundStatus.INBOUND_SUCCESS,
status: zetaChainCCTXType.InboundStatus.SUCCESS,
confirmation_mode: zetaChainCCTXType.ConfirmationMode.SAFE,
},
outbound_params: [
{
receiver: '0xDCbFA87533A478743B3f507e76170eA6F26FA69a',
receiver_chain_id: 11155111,
coin_type: zetaChainCCTXType.CoinType.ERC20,
coin_type: zetaChainCCTXType.CoinType.Erc20,
amount: '0',
tss_nonce: 0,
gas_limit: 0,
@@ -151,7 +151,7 @@ export const zetaChainCCTXFailed: zetaChainCCTXType.CrossChainTx = {
effective_gas_price: '0',
effective_gas_limit: 0,
tss_pubkey: 'zetapub1addwnpepq28c57cvcs0a2htsem5zxr6qnlvq9mzhmm76z3jncsnzz32rclangr2g35p',
tx_finalization_status: zetaChainCCTXType.TxFinalizationStatus.EXECUTED,
tx_finalization_status: zetaChainCCTXType.TxFinalizationStatus.Executed,
call_options: {
gas_limit: 1500000,
is_arbitrary_call: false,
@@ -161,7 +161,7 @@ export const zetaChainCCTXFailed: zetaChainCCTXType.CrossChainTx = {
{
receiver: '0xDCbFA87533A478743B3f507e76170eA6F26FA69a',
receiver_chain_id: 11155111,
coin_type: zetaChainCCTXType.CoinType.ERC20,
coin_type: zetaChainCCTXType.CoinType.Erc20,
amount: '9999999',
tss_nonce: 842,
gas_limit: 0,
@@ -174,7 +174,7 @@ export const zetaChainCCTXFailed: zetaChainCCTXType.CrossChainTx = {
effective_gas_price: '2',
effective_gas_limit: 100000,
tss_pubkey: 'zetapub1addwnpepq28c57cvcs0a2htsem5zxr6qnlvq9mzhmm76z3jncsnzz32rclangr2g35p',
tx_finalization_status: zetaChainCCTXType.TxFinalizationStatus.EXECUTED,
tx_finalization_status: zetaChainCCTXType.TxFinalizationStatus.Executed,
call_options: {
gas_limit: 21000,
is_arbitrary_call: false,
@@ -196,21 +196,21 @@ export const zetaChainCCTXFailed: zetaChainCCTXType.CrossChainTx = {
index: '0x004d60b58cbbead6ddc0a100e17b88484f72e4f47b10c4b560a41cadd3315c4c',
depth: 0,
source_chain_id: 7001,
status: zetaChainCCTXType.CctxStatus.REVERTED,
status_reduced: zetaChainCCTXType.CctxStatusReduced.FAILED,
status: zetaChainCCTXType.CctxStatus.Reverted,
status_reduced: zetaChainCCTXType.CctxStatusReduced.Failed,
inbound_amount: '10000000',
inbound_coin_type: zetaChainCCTXType.CoinType.ERC20,
inbound_coin_type: zetaChainCCTXType.CoinType.Erc20,
outbound_params: [
{
amount: '0',
chain_id: 7001,
coin_type: zetaChainCCTXType.CoinType.ERC20,
coin_type: zetaChainCCTXType.CoinType.Erc20,
gas_used: 0,
},
{
amount: '9999999',
chain_id: 11155111,
coin_type: zetaChainCCTXType.CoinType.ERC20,
coin_type: zetaChainCCTXType.CoinType.Erc20,
gas_used: 61955,
},
],
@@ -226,10 +226,10 @@ export const zetaChainCCTXFailed: zetaChainCCTXType.CrossChainTx = {
export const zetaChainCCTXPending: zetaChainCCTXType.CrossChainTx = {
...zetaChainCCTX,
index: '0x5f5f7410d7dfefe6173cc11efa47221e85587d3831c69108121198e0b2a86661',
cctx_status_reduced: zetaChainCCTXType.CctxStatusReduced.PENDING,
cctx_status_reduced: zetaChainCCTXType.CctxStatusReduced.Pending,
cctx_status: {
...zetaChainCCTX.cctx_status,
status: zetaChainCCTXType.CctxStatus.PENDING_INBOUND,
status: zetaChainCCTXType.CctxStatus.PendingInbound,
status_message: 'Waiting for inbound confirmation',
error_message: '',
last_update_timestamp: 1641139818,
@@ -247,8 +247,8 @@ export const zetaChainCCTXList: zetaChainCCTXType.ListCctxsResponse = {
{
...zetaChainCCTXItem,
index: '0x2d2e7410d7dfefe6173cc11efa47221e85587d3831c69108121198e0b2a86658',
status: zetaChainCCTXType.CctxStatus.OUTBOUND_MINED,
status_reduced: zetaChainCCTXType.CctxStatusReduced.SUCCESS,
status: zetaChainCCTXType.CctxStatus.OutboundMined,
status_reduced: zetaChainCCTXType.CctxStatusReduced.Success,
amount: '500000000000000000',
sender_address: '0x1234567890123456789012345678901234567890',
receiver_address: '0xabcdefabcdefabcdefabcdefabcdefabcdefabcd',
@@ -256,12 +256,12 @@ export const zetaChainCCTXList: zetaChainCCTXType.ListCctxsResponse = {
{
...zetaChainCCTXItem,
index: '0x3f3f7410d7dfefe6173cc11efa47221e85587d3831c69108121198e0b2a86659',
status: zetaChainCCTXType.CctxStatus.PENDING_INBOUND,
status_reduced: zetaChainCCTXType.CctxStatusReduced.PENDING,
status: zetaChainCCTXType.CctxStatus.PendingInbound,
status_reduced: zetaChainCCTXType.CctxStatusReduced.Pending,
amount: '750000000000000000',
sender_address: '0xabcdefabcdefabcdefabcdefabcdefabcdefabcd',
receiver_address: '0x9876543210987654321098765432109876543210',
},
],
next_page_params: { page_key: 1, limit: 50, direction: zetaChainCCTXType.Direction.DESC },
next_page_params: { page_key: 1, limit: 50, direction: zetaChainCCTXType.Direction.Desc },
};
+10 -10
View File
@@ -9,13 +9,13 @@ export const ZETA_CHAIN_CCTX: zetaChainCCTXType.CrossChainTx = {
index: TX_HASH,
zeta_fees: '0',
relayed_message: '',
cctx_status_reduced: zetaChainCCTXType.CctxStatusReduced.PENDING,
cctx_status_reduced: zetaChainCCTXType.CctxStatusReduced.Pending,
token_symbol: 'USDT.ARBSEP',
token_name: 'USDT.ARBSEP',
zrc20_contract_address: ADDRESS_HASH,
decimals: 6,
cctx_status: {
status: zetaChainCCTXType.CctxStatus.OUTBOUND_MINED,
status: zetaChainCCTXType.CctxStatus.OutboundMined,
status_message: '',
error_message: '',
last_update_timestamp: 1641139818,
@@ -28,23 +28,23 @@ export const ZETA_CHAIN_CCTX: zetaChainCCTXType.CrossChainTx = {
sender: ADDRESS_HASH,
sender_chain_id: 7001,
tx_origin: ADDRESS_HASH,
coin_type: zetaChainCCTXType.CoinType.GAS,
coin_type: zetaChainCCTXType.CoinType.Gas,
asset: '',
amount: '434880247204065094',
observed_hash: BLOCK_HASH,
observed_external_height: 12324831,
ballot_index: '',
finalized_zeta_height: 0,
tx_finalization_status: zetaChainCCTXType.TxFinalizationStatus.NOT_FINALIZED,
tx_finalization_status: zetaChainCCTXType.TxFinalizationStatus.NotFinalized,
is_cross_chain_call: false,
status: zetaChainCCTXType.InboundStatus.INBOUND_SUCCESS,
status: zetaChainCCTXType.InboundStatus.SUCCESS,
confirmation_mode: zetaChainCCTXType.ConfirmationMode.SAFE,
},
outbound_params: [
{
receiver: ADDRESS_HASH,
receiver_chain_id: 7001,
coin_type: zetaChainCCTXType.CoinType.GAS,
coin_type: zetaChainCCTXType.CoinType.Gas,
amount: '0',
tss_nonce: 0,
gas_limit: 0,
@@ -57,7 +57,7 @@ export const ZETA_CHAIN_CCTX: zetaChainCCTXType.CrossChainTx = {
effective_gas_price: '',
effective_gas_limit: 0,
tss_pubkey: '',
tx_finalization_status: zetaChainCCTXType.TxFinalizationStatus.NOT_FINALIZED,
tx_finalization_status: zetaChainCCTXType.TxFinalizationStatus.NotFinalized,
call_options: {
gas_limit: 0,
is_arbitrary_call: false,
@@ -78,8 +78,8 @@ export const ZETA_CHAIN_CCTX: zetaChainCCTXType.CrossChainTx = {
export const ZETA_CHAIN_CCTX_LIST_ITEM: zetaChainCCTXType.CctxListItem = {
index: TX_HASH,
status: zetaChainCCTXType.CctxStatus.OUTBOUND_MINED,
status_reduced: zetaChainCCTXType.CctxStatusReduced.SUCCESS,
status: zetaChainCCTXType.CctxStatus.OutboundMined,
status_reduced: zetaChainCCTXType.CctxStatusReduced.Success,
amount: '434880247204065094',
source_chain_id: 7001,
target_chain_id: 7001,
@@ -88,7 +88,7 @@ export const ZETA_CHAIN_CCTX_LIST_ITEM: zetaChainCCTXType.CctxListItem = {
sender_address: ADDRESS_HASH,
receiver_address: ADDRESS_HASH,
asset: '',
coin_type: zetaChainCCTXType.CoinType.GAS,
coin_type: zetaChainCCTXType.CoinType.Gas,
token_symbol: 'USDT.ARBSEP',
decimals: 6,
};
@@ -25,7 +25,7 @@ test('base view +@dark-mode', async({ render, mockApiResponse }) => {
queryParams: {
limit: 8,
offset: 0,
direction: zetaChainCCTXType.Direction.DESC,
direction: zetaChainCCTXType.Direction.Desc,
},
});
@@ -41,7 +41,7 @@ test.describe('mobile', () => {
queryParams: {
limit: 3,
offset: 0,
direction: zetaChainCCTXType.Direction.DESC,
direction: zetaChainCCTXType.Direction.Desc,
},
});
@@ -30,7 +30,7 @@ const LatestZetaChainCCTXs = () => {
placeholderData: generateListStub<'zetachain:transactions'>(
ZETA_CHAIN_CCTX_LIST_ITEM,
50,
{ next_page_params: { page_key: 0, limit: 0, direction: Direction.DESC } },
{ next_page_params: { page_key: 0, limit: 0, direction: Direction.Desc } },
),
},
queryParams: {
@@ -13,13 +13,13 @@ type Props = {
const ZetaChainCCTXReducedStatus = ({ status, isLoading, type = 'reduced' }: Props) => {
let statusTagType: StatusTagType;
switch (status) {
case CctxStatusReduced.SUCCESS:
case CctxStatusReduced.Success:
statusTagType = 'ok';
break;
case CctxStatusReduced.PENDING:
case CctxStatusReduced.Pending:
statusTagType = 'pending';
break;
case CctxStatusReduced.FAILED:
case CctxStatusReduced.Failed:
statusTagType = 'error';
break;
case CctxStatusReduced.UNRECOGNIZED:
@@ -30,13 +30,13 @@ const ZetaChainCCTXReducedStatus = ({ status, isLoading, type = 'reduced' }: Pro
if (type === 'full') {
let text: string;
switch (status) {
case CctxStatusReduced.SUCCESS:
case CctxStatusReduced.Success:
text = 'Success';
break;
case CctxStatusReduced.PENDING:
case CctxStatusReduced.Pending:
text = 'Pending';
break;
case CctxStatusReduced.FAILED:
case CctxStatusReduced.Failed:
text = 'Failed';
break;
case CctxStatusReduced.UNRECOGNIZED:
@@ -10,12 +10,12 @@ type Props = {
};
const TagText: Record<CctxStatus, string> = {
[CctxStatus.PENDING_OUTBOUND]: 'Pending outbound',
[CctxStatus.PENDING_INBOUND]: 'Pending inbound',
[CctxStatus.OUTBOUND_MINED]: 'Outbound mined',
[CctxStatus.PENDING_REVERT]: 'Pending revert',
[CctxStatus.ABORTED]: 'Aborted',
[CctxStatus.REVERTED]: 'Reverted',
[CctxStatus.PendingOutbound]: 'Pending outbound',
[CctxStatus.PendingInbound]: 'Pending inbound',
[CctxStatus.OutboundMined]: 'Outbound mined',
[CctxStatus.PendingRevert]: 'Pending revert',
[CctxStatus.Aborted]: 'Aborted',
[CctxStatus.Reverted]: 'Reverted',
[CctxStatus.UNRECOGNIZED]: 'Unknown Status',
};
+3 -3
View File
@@ -21,15 +21,15 @@ const ZetaChainCCTXValue = ({ coinType, tokenSymbol, amount, decimals, isLoading
let unit: string;
let value: string | undefined;
switch (coinType) {
case CoinType.ERC20:
case CoinType.Erc20:
unit = tokenSymbol || 'Unnamed token';
value = calculateUsdValue({ amount, decimals: decimals?.toString() || '18', accuracy }).valueStr;
break;
case CoinType.ZETA:
case CoinType.Zeta:
unit = config.chain.currency.symbol || config.chain.currency.name || '';
value = calculateUsdValue({ amount, decimals: config.chain.currency.decimals?.toString() || '18', accuracy }).valueStr;
break;
case CoinType.GAS:
case CoinType.Gas:
unit = tokenSymbol || 'Unnamed token';
value = calculateUsdValue({ amount, decimals: decimals?.toString() || '18', accuracy }).valueStr;
break;
+2 -2
View File
@@ -69,7 +69,7 @@ const ZetaChainCCTXsTab = () => {
direction: 'DESC',
},
options: {
placeholderData: { items: Array(50).fill(ZETA_CHAIN_CCTX_LIST_ITEM), next_page_params: { limit: 0, page_key: 0, direction: Direction.DESC } },
placeholderData: { items: Array(50).fill(ZETA_CHAIN_CCTX_LIST_ITEM), next_page_params: { limit: 0, page_key: 0, direction: Direction.Desc } },
enabled: tab === 'cctx' || tab === 'cctx_mined',
},
hasNextPageFn,
@@ -85,7 +85,7 @@ const ZetaChainCCTXsTab = () => {
direction: 'DESC',
},
options: {
placeholderData: { items: Array(50).fill(ZETA_CHAIN_CCTX_LIST_ITEM), next_page_params: { limit: 0, page_key: 0, direction: Direction.DESC } },
placeholderData: { items: Array(50).fill(ZETA_CHAIN_CCTX_LIST_ITEM), next_page_params: { limit: 0, page_key: 0, direction: Direction.Desc } },
enabled: tab === 'cctx_pending',
},
hasNextPageFn,
@@ -30,7 +30,7 @@ const ZetaChainCCTXDetailsLifecycleIn = ({ tx, isLoading }: Props) => {
const chainFrom = chainsConfig?.find((chain) => chain.id.toString() === chainFromId);
const isCCTX = tx.related_cctxs.some((cctx) => cctx.index === inboundParams.observed_hash);
const color = inboundParams.status === InboundStatus.INBOUND_SUCCESS ? 'text.success' : 'text.error';
const color = inboundParams.status === InboundStatus.SUCCESS ? 'text.success' : 'text.error';
return (
<>
@@ -72,8 +72,8 @@ const ZetaChainCCTXDetailsLifecycleIn = ({ tx, isLoading }: Props) => {
) }
<Text color="text.secondary" fontWeight="medium">Status</Text>
<StatusTag
type={ inboundParams.status === InboundStatus.INBOUND_SUCCESS ? 'ok' : 'error' }
text={ inboundParams.status === InboundStatus.INBOUND_SUCCESS ? 'Success' : 'Failed' }
type={ inboundParams.status === InboundStatus.SUCCESS ? 'ok' : 'error' }
text={ inboundParams.status === InboundStatus.SUCCESS ? 'Success' : 'Failed' }
/>
{ inboundParams.sender && (
<>
@@ -30,7 +30,7 @@ const ZetaChainCCTXDetailsLifecycleOut = ({ outboundParam, tx, isLoading, isLast
const gasDecimals = config.chain.currency.decimals;
if (tx.cctx_status?.status === CctxStatus.PENDING_INBOUND) {
if (tx.cctx_status?.status === CctxStatus.PendingInbound) {
return null;
}
@@ -67,7 +67,7 @@ const ZetaChainCCTXDetailsLifecycleOut = ({ outboundParam, tx, isLoading, isLast
);
})();
if (tx.cctx_status?.status === CctxStatus.OUTBOUND_MINED) {
if (tx.cctx_status?.status === CctxStatus.OutboundMined) {
content = (
<>
{ transactionOrCCTX }
@@ -96,7 +96,7 @@ const ZetaChainCCTXDetailsLifecycleOut = ({ outboundParam, tx, isLoading, isLast
);
text = `Sent tx to ${ chainTo?.name || 'Unknown chain' }`;
color = 'text.success';
} else if (tx.cctx_status?.status === CctxStatus.PENDING_REVERT) {
} else if (tx.cctx_status?.status === CctxStatus.PendingRevert) {
if (!isLast) {
content = (
<>
@@ -122,7 +122,7 @@ const ZetaChainCCTXDetailsLifecycleOut = ({ outboundParam, tx, isLoading, isLast
text = `Waiting for revert to ${ chainTo?.name || 'Unknown chain' }`;
color = 'text.secondary';
}
} else if (tx.cctx_status?.status === CctxStatus.PENDING_OUTBOUND) {
} else if (tx.cctx_status?.status === CctxStatus.PendingOutbound) {
content = (
<>
<Text color="text.secondary" fontWeight="medium">Destination</Text>
@@ -138,7 +138,7 @@ const ZetaChainCCTXDetailsLifecycleOut = ({ outboundParam, tx, isLoading, isLast
);
text = `Waiting for outbound tx to ${ chainTo?.name || 'Unknown chain' }`;
color = 'text.secondary';
} else if (tx.cctx_status?.status === CctxStatus.REVERTED) {
} else if (tx.cctx_status?.status === CctxStatus.Reverted) {
if (!isLast) {
content = (
<>
@@ -179,7 +179,7 @@ const ZetaChainCCTXDetailsLifecycleOut = ({ outboundParam, tx, isLoading, isLast
text = `Reverted to ${ chainTo?.name || 'Unknown chain' }`;
color = 'text.success';
}
} else if (tx.cctx_status?.status === CctxStatus.ABORTED) {
} else if (tx.cctx_status?.status === CctxStatus.Aborted) {
if (!isLast) {
content = (
<>
@@ -22,10 +22,10 @@ const ZetaChainCCTXDetailsRelatedTx = ({ tx, isLoading }: Props) => {
const chainsTo = tx.outbound_params.map((p) => chainsConfig?.find((chain) => chain.id === p.chain_id.toString()));
const color = (() => {
if (tx.status_reduced === CctxStatusReduced.SUCCESS) {
if (tx.status_reduced === CctxStatusReduced.Success) {
return 'text.success';
}
if (tx.status_reduced === CctxStatusReduced.FAILED) {
if (tx.status_reduced === CctxStatusReduced.Failed) {
return 'text.error';
}
return 'text.secondary';
+2 -2
View File
@@ -68,8 +68,8 @@ const ZetaChainCCTxs = ({
});
const filteredPayload = type === 'pending' ?
payload.filter(tx => tx.status_reduced === CctxStatusReduced.PENDING) :
payload.filter(tx => tx.status_reduced === CctxStatusReduced.SUCCESS || tx.status_reduced === CctxStatusReduced.FAILED);
payload.filter(tx => tx.status_reduced === CctxStatusReduced.Pending) :
payload.filter(tx => tx.status_reduced === CctxStatusReduced.Success || tx.status_reduced === CctxStatusReduced.Failed);
queryClient.setQueryData(currentQueryKey, (prevData: ListCctxsResponse | undefined) => {
if (!prevData) {