diff --git a/src/bridgeDataProviders/dipDupBridgeDataProvider/dipDupGraphQLQueryBuilder/dipDupGraphQLQueryBuilder.ts b/src/bridgeDataProviders/dipDupBridgeDataProvider/dipDupGraphQLQueryBuilder/dipDupGraphQLQueryBuilder.ts index b10dfe5..71fbc65 100644 --- a/src/bridgeDataProviders/dipDupBridgeDataProvider/dipDupGraphQLQueryBuilder/dipDupGraphQLQueryBuilder.ts +++ b/src/bridgeDataProviders/dipDupBridgeDataProvider/dipDupGraphQLQueryBuilder/dipDupGraphQLQueryBuilder.ts @@ -21,7 +21,8 @@ type BridgeOperationStatus = | 'FAILED_INVALID_ROUTING_PROXY_NOT_WHITELISTED' | 'FAILED_INVALID_ROUTING_PROXY_EMPTY_PROXY' | 'FAILED_INVALID_ROUTING_INVALID_PROXY_ADDRESS' - | 'FAILED_OUTBOX_EXPIRED'; + | 'FAILED_OUTBOX_EXPIRED' + | 'FAILED_INBOX_MATCHING_TIMEOUT'; export interface GraphQLTransfersFilter { type?: BridgeOperationType[] | null; diff --git a/src/bridgeDataProviders/dipDupBridgeDataProvider/dtos.ts b/src/bridgeDataProviders/dipDupBridgeDataProvider/dtos.ts index 3527542..fcb0433 100644 --- a/src/bridgeDataProviders/dipDupBridgeDataProvider/dtos.ts +++ b/src/bridgeDataProviders/dipDupBridgeDataProvider/dtos.ts @@ -9,7 +9,8 @@ export type BridgeOperationFailedStatus = | 'FAILED_INVALID_ROUTING_PROXY_NOT_WHITELISTED' | 'FAILED_INVALID_ROUTING_PROXY_EMPTY_PROXY' | 'FAILED_INVALID_ROUTING_INVALID_PROXY_ADDRESS' - | 'FAILED_OUTBOX_EXPIRED'; + | 'FAILED_OUTBOX_EXPIRED' + | 'FAILED_INBOX_MATCHING_TIMEOUT'; export type BridgeOperationStatus = BridgeOperationCommonStatus | BridgeOperationFailedStatus; diff --git a/src/bridgeDataProviders/dipDupBridgeDataProvider/mappers.ts b/src/bridgeDataProviders/dipDupBridgeDataProvider/mappers.ts index 216cf4c..92f4842 100644 --- a/src/bridgeDataProviders/dipDupBridgeDataProvider/mappers.ts +++ b/src/bridgeDataProviders/dipDupBridgeDataProvider/mappers.ts @@ -287,7 +287,8 @@ export const mapBridgeTokenTransferStatusToBridgeOperationDtoStatuses = (status: 'FAILED_INVALID_ROUTING_PROXY_NOT_WHITELISTED', 'FAILED_INVALID_ROUTING_PROXY_EMPTY_PROXY', 'FAILED_INVALID_ROUTING_INVALID_PROXY_ADDRESS', - 'FAILED_OUTBOX_EXPIRED' + 'FAILED_OUTBOX_EXPIRED', + 'FAILED_INBOX_MATCHING_TIMEOUT' ]; default: return null; diff --git a/tests/dipDupGraphQLQueryBuilder/testCases/getTokenTransfersQueryByAccountAddressesTestCases.ts b/tests/dipDupGraphQLQueryBuilder/testCases/getTokenTransfersQueryByAccountAddressesTestCases.ts index 8cc9b79..32cb2cd 100644 --- a/tests/dipDupGraphQLQueryBuilder/testCases/getTokenTransfersQueryByAccountAddressesTestCases.ts +++ b/tests/dipDupGraphQLQueryBuilder/testCases/getTokenTransfersQueryByAccountAddressesTestCases.ts @@ -255,9 +255,9 @@ export const getTokenTransfersQueryByAccountAddressesTestCases: TestCases = [ offset: 0, limit: 100, filter: { - status: ['FAILED', 'FAILED_INVALID_ROUTING_INFO_REVERTABLE', 'FAILED_INVALID_ROUTING_PROXY_NOT_WHITELISTED', 'FAILED_INVALID_ROUTING_PROXY_EMPTY_PROXY', 'FAILED_INVALID_ROUTING_INVALID_PROXY_ADDRESS', 'FAILED_OUTBOX_EXPIRED'] + status: ['FAILED', 'FAILED_INVALID_ROUTING_INFO_REVERTABLE', 'FAILED_INVALID_ROUTING_PROXY_NOT_WHITELISTED', 'FAILED_INVALID_ROUTING_PROXY_EMPTY_PROXY', 'FAILED_INVALID_ROUTING_INVALID_PROXY_ADDRESS', 'FAILED_OUTBOX_EXPIRED', 'FAILED_INBOX_MATCHING_TIMEOUT'] }, - expectedQuery: 'query TokenTransfers { bridge_operation( where: { status: { _in: ["FAILED","FAILED_INVALID_ROUTING_INFO_REVERTABLE","FAILED_INVALID_ROUTING_PROXY_NOT_WHITELISTED","FAILED_INVALID_ROUTING_PROXY_EMPTY_PROXY","FAILED_INVALID_ROUTING_INVALID_PROXY_ADDRESS","FAILED_OUTBOX_EXPIRED"] }, _or: [ { deposit: { l1_transaction: { _or: [ { l1_account: { _eq: "tz1M6VFkpALGXYoP5CvobR3z1pYu7KvirpMF" } }{ l2_account: { _eq: "4a1819c83a78c948db50f80fed82721dd0401c9b" } } ] } } } { withdrawal: { l2_transaction: { _or: [ { l1_account: { _eq: "tz1M6VFkpALGXYoP5CvobR3z1pYu7KvirpMF" } }{ l2_account: { _eq: "4a1819c83a78c948db50f80fed82721dd0401c9b" } } ] } } } ] }, order_by: { created_at: desc }, offset: 0, limit: 100 ) { type status is_completed is_successful created_at updated_at deposit { l1_transaction { level operation_hash counter nonce amount ticket { token { type contract_address token_id } } l1_account l2_account timestamp inbox_message { type level index } } l2_transaction { level transaction_hash log_index amount l2_token { id } timestamp } } withdrawal { l1_transaction { level operation_hash counter nonce timestamp } l2_transaction { level transaction_hash log_index amount l2_token { id ticket { token { type contract_address token_id } } } l1_account l2_account timestamp outbox_message { level index commitment { hash } proof cemented_at } } } } }' + expectedQuery: 'query TokenTransfers { bridge_operation( where: { status: { _in: ["FAILED","FAILED_INVALID_ROUTING_INFO_REVERTABLE","FAILED_INVALID_ROUTING_PROXY_NOT_WHITELISTED","FAILED_INVALID_ROUTING_PROXY_EMPTY_PROXY","FAILED_INVALID_ROUTING_INVALID_PROXY_ADDRESS","FAILED_OUTBOX_EXPIRED","FAILED_INBOX_MATCHING_TIMEOUT"] }, _or: [ { deposit: { l1_transaction: { _or: [ { l1_account: { _eq: "tz1M6VFkpALGXYoP5CvobR3z1pYu7KvirpMF" } }{ l2_account: { _eq: "4a1819c83a78c948db50f80fed82721dd0401c9b" } } ] } } } { withdrawal: { l2_transaction: { _or: [ { l1_account: { _eq: "tz1M6VFkpALGXYoP5CvobR3z1pYu7KvirpMF" } }{ l2_account: { _eq: "4a1819c83a78c948db50f80fed82721dd0401c9b" } } ] } } } ] }, order_by: { created_at: desc }, offset: 0, limit: 100 ) { type status is_completed is_successful created_at updated_at deposit { l1_transaction { level operation_hash counter nonce amount ticket { token { type contract_address token_id } } l1_account l2_account timestamp inbox_message { type level index } } l2_transaction { level transaction_hash log_index amount l2_token { id } timestamp } } withdrawal { l1_transaction { level operation_hash counter nonce timestamp } l2_transaction { level transaction_hash log_index amount l2_token { id ticket { token { type contract_address token_id } } } l1_account l2_account timestamp outbox_message { level index commitment { hash } proof cemented_at } } } } }' } ], [ diff --git a/tests/dipDupGraphQLQueryBuilder/testCases/getTokenTransfersQueryTestCases.ts b/tests/dipDupGraphQLQueryBuilder/testCases/getTokenTransfersQueryTestCases.ts index 50be0e5..30731b1 100644 --- a/tests/dipDupGraphQLQueryBuilder/testCases/getTokenTransfersQueryTestCases.ts +++ b/tests/dipDupGraphQLQueryBuilder/testCases/getTokenTransfersQueryTestCases.ts @@ -146,9 +146,9 @@ export const getTokenTransfersQueryTestCases: TestCases = [ offset: 0, limit: 100, filter: { - status: ['FAILED', 'FAILED_INVALID_ROUTING_INFO_REVERTABLE', 'FAILED_INVALID_ROUTING_PROXY_NOT_WHITELISTED', 'FAILED_INVALID_ROUTING_PROXY_EMPTY_PROXY', 'FAILED_INVALID_ROUTING_INVALID_PROXY_ADDRESS', 'FAILED_OUTBOX_EXPIRED'] + status: ['FAILED', 'FAILED_INVALID_ROUTING_INFO_REVERTABLE', 'FAILED_INVALID_ROUTING_PROXY_NOT_WHITELISTED', 'FAILED_INVALID_ROUTING_PROXY_EMPTY_PROXY', 'FAILED_INVALID_ROUTING_INVALID_PROXY_ADDRESS', 'FAILED_OUTBOX_EXPIRED', 'FAILED_INBOX_MATCHING_TIMEOUT'] }, - expectedQuery: 'query TokenTransfers { bridge_operation( where: { status: { _in: ["FAILED","FAILED_INVALID_ROUTING_INFO_REVERTABLE","FAILED_INVALID_ROUTING_PROXY_NOT_WHITELISTED","FAILED_INVALID_ROUTING_PROXY_EMPTY_PROXY","FAILED_INVALID_ROUTING_INVALID_PROXY_ADDRESS","FAILED_OUTBOX_EXPIRED"] } }, order_by: { created_at: desc }, offset: 0, limit: 100 ) { type status is_completed is_successful created_at updated_at deposit { l1_transaction { level operation_hash counter nonce amount ticket { token { type contract_address token_id } } l1_account l2_account timestamp inbox_message { type level index } } l2_transaction { level transaction_hash log_index amount l2_token { id } timestamp } } withdrawal { l1_transaction { level operation_hash counter nonce timestamp } l2_transaction { level transaction_hash log_index amount l2_token { id ticket { token { type contract_address token_id } } } l1_account l2_account timestamp outbox_message { level index commitment { hash } proof cemented_at } } } } }' + expectedQuery: 'query TokenTransfers { bridge_operation( where: { status: { _in: ["FAILED","FAILED_INVALID_ROUTING_INFO_REVERTABLE","FAILED_INVALID_ROUTING_PROXY_NOT_WHITELISTED","FAILED_INVALID_ROUTING_PROXY_EMPTY_PROXY","FAILED_INVALID_ROUTING_INVALID_PROXY_ADDRESS","FAILED_OUTBOX_EXPIRED","FAILED_INBOX_MATCHING_TIMEOUT"] } }, order_by: { created_at: desc }, offset: 0, limit: 100 ) { type status is_completed is_successful created_at updated_at deposit { l1_transaction { level operation_hash counter nonce amount ticket { token { type contract_address token_id } } l1_account l2_account timestamp inbox_message { type level index } } l2_transaction { level transaction_hash log_index amount l2_token { id } timestamp } } withdrawal { l1_transaction { level operation_hash counter nonce timestamp } l2_transaction { level transaction_hash log_index amount l2_token { id ticket { token { type contract_address token_id } } } l1_account l2_account timestamp outbox_message { level index commitment { hash } proof cemented_at } } } } }' } ], [