Skip to content

Commit

Permalink
Adding to all bridge watcher queries
Browse files Browse the repository at this point in the history
  • Loading branch information
Defi-Moses committed Oct 30, 2024
1 parent 434d1d9 commit 6b9ec9d
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 28 deletions.
20 changes: 12 additions & 8 deletions services/explorer/graphql/client/client.go

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

2 changes: 2 additions & 0 deletions services/explorer/graphql/client/queries/queries.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ query GetOriginBridgeTx($chainID: Int!, $txnHash: String!, $bridgeType: BridgeTy
type
kappa
kappaStatus
bridgeModule
}
}
query GetDestinationBridgeTx($chainID: Int!, $kappa: String!, $address: String!, $timestamp: Int!, $bridgeType: BridgeType!, $historical: Boolean) {
Expand Down Expand Up @@ -333,5 +334,6 @@ query GetDestinationBridgeTx($chainID: Int!, $kappa: String!, $address: String!,
type
kappa
kappaStatus
bridgeModule
}
}
11 changes: 6 additions & 5 deletions services/explorer/graphql/server/graph/model/models_gen.go

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

24 changes: 14 additions & 10 deletions services/explorer/graphql/server/graph/queryutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -1777,12 +1777,14 @@ func bwBridgeMVToBWTxOrigin(bridgeEvent *sql.HybridBridgeEvent, txType model.Bri
Time: &timestamp,
FormattedTime: &timeStampFormatted,
}
bridgeModule := getBridgeModule(int(bridgeEvent.FEventType))

Check warning on line 1780 in services/explorer/graphql/server/graph/queryutils.go

View check run for this annotation

Codecov / codecov/patch

services/explorer/graphql/server/graph/queryutils.go#L1780

Added line #L1780 was not covered by tests
result := &model.BridgeWatcherTx{
BridgeTx: &bridgeTx,
Pending: &isPending,
Type: &txType,
Kappa: &kappa,
KappaStatus: &kappaStatus,
BridgeTx: &bridgeTx,
Pending: &isPending,
Type: &txType,
Kappa: &kappa,
KappaStatus: &kappaStatus,
BridgeModule: &bridgeModule,

Check warning on line 1787 in services/explorer/graphql/server/graph/queryutils.go

View check run for this annotation

Codecov / codecov/patch

services/explorer/graphql/server/graph/queryutils.go#L1782-L1787

Added lines #L1782 - L1787 were not covered by tests
}
return result, nil
}
Expand Down Expand Up @@ -1825,12 +1827,14 @@ func bwBridgeMVToBWTxDestination(bridgeEvent *sql.HybridBridgeEvent, txType mode
Time: &timestamp,
FormattedTime: &timeStampFormatted,
}
bridgeModule := getBridgeModule(int(bridgeEvent.TEventType))

Check warning on line 1830 in services/explorer/graphql/server/graph/queryutils.go

View check run for this annotation

Codecov / codecov/patch

services/explorer/graphql/server/graph/queryutils.go#L1830

Added line #L1830 was not covered by tests
result := &model.BridgeWatcherTx{
BridgeTx: &bridgeTx,
Pending: &isPending,
Type: &txType,
Kappa: &kappa,
KappaStatus: &kappaStatus,
BridgeTx: &bridgeTx,
Pending: &isPending,
Type: &txType,
Kappa: &kappa,
KappaStatus: &kappaStatus,
BridgeModule: &bridgeModule,

Check warning on line 1837 in services/explorer/graphql/server/graph/queryutils.go

View check run for this annotation

Codecov / codecov/patch

services/explorer/graphql/server/graph/queryutils.go#L1832-L1837

Added lines #L1832 - L1837 were not covered by tests
}
return result, nil
}
Expand Down
66 changes: 61 additions & 5 deletions services/explorer/graphql/server/graph/resolver/server.go

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 @@ -44,6 +44,7 @@ type BridgeWatcherTx {
type: BridgeTxType
kappa: String
kappaStatus: KappaStatus
bridgeModule: String
}
"""
DateResult is a given statistic for a given date.
Expand Down

0 comments on commit 6b9ec9d

Please sign in to comment.