Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
colinlyguo committed Sep 25, 2023
1 parent f69abf6 commit 59958a6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bridge-history-api/orm/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (r *RollupBatch) GetRollupBatchByIndex(ctx context.Context, index uint64) (
// GetRollupBatchesByIndexes return the rollup batches by indexes
func (r *RollupBatch) GetRollupBatchesByIndexes(ctx context.Context, indexes []uint64) ([]*RollupBatch, error) {
var results []*RollupBatch
err := r.db.WithContext(ctx).Model(&RollupBatch{}).Where("batch_index IN ?", indexes).Find(&results).Error
err := r.db.WithContext(ctx).Model(&RollupBatch{}).Where("batch_index IN (?)", indexes).Find(&results).Error
if err != nil {
return nil, fmt.Errorf("RollupBatch.GetRollupBatchesByIndexes error: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion bridge-history-api/orm/cross_msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ func (c *CrossMsg) GetCrossMsgsByAddressWithOffset(ctx context.Context, sender s
// GetCrossMsgsByHashes retrieves a list of cross messages identified by their Layer 1 or Layer 2 hashes.
func (c *CrossMsg) GetCrossMsgsByHashes(ctx context.Context, hashes []string) ([]*CrossMsg, error) {
var results []*CrossMsg
err := c.db.WithContext(ctx).Model(&CrossMsg{}).Where("layer1_hash IN ? OR layer2_hash IN ?", hashes, hashes).Find(&results).Error
err := c.db.WithContext(ctx).Model(&CrossMsg{}).Where("layer1_hash IN (?) OR layer2_hash IN (?)", hashes, hashes).Find(&results).Error
if err != nil {
return nil, fmt.Errorf("CrossMsg.GetCrossMsgsByHashes error: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion bridge-history-api/orm/l2_sent_msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (l *L2SentMsg) GetL2SentMsgByHash(ctx context.Context, msgHash string) (*L2
func (l *L2SentMsg) GetL2SentMsgsByHashes(ctx context.Context, msgHashes []string) ([]*L2SentMsg, error) {
var results []*L2SentMsg
err := l.db.WithContext(ctx).Model(&L2SentMsg{}).
Where("msg_hash IN ?", msgHashes).
Where("msg_hash IN (?)", msgHashes).
Find(&results).
Error
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion bridge-history-api/orm/relayed_msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (r *RelayedMsg) GetRelayedMsgByHash(ctx context.Context, msgHash string) (*
func (r *RelayedMsg) GetRelayedMsgsByHashes(ctx context.Context, msgHashes []string) ([]*RelayedMsg, error) {
var results []*RelayedMsg
err := r.db.WithContext(ctx).Model(&RelayedMsg{}).
Where("msg_hash IN ?", msgHashes).
Where("msg_hash IN (?)", msgHashes).
Find(&results).
Error
if err != nil {
Expand Down

0 comments on commit 59958a6

Please sign in to comment.