Skip to content

Commit

Permalink
test(explorer): fix the amount in withdraw parity test (#3370)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiTimesChi authored Nov 5, 2024
1 parent 7c5c4f1 commit f09281b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions services/explorer/backfill/chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,7 @@ func (b *BackfillSuite) withdrawParity(log *types.Log, parser *parser.BridgePars
String: common.Bytes2Hex(parsedLog.Kappa[:]),
Valid: true,
}
amountMinusFee := new(big.Int).Sub(parsedLog.Amount, parsedLog.Fee)
var count int64
events := b.db.UNSAFE_DB().WithContext(b.GetTestContext()).Model(&sql.BridgeEvent{}).
Where(&sql.BridgeEvent{
Expand All @@ -878,7 +879,7 @@ func (b *BackfillSuite) withdrawParity(log *types.Log, parser *parser.BridgePars
BlockNumber: log.BlockNumber,
TxHash: log.TxHash.String(),
Token: parsedLog.Token.String(),
Amount: parsedLog.Amount,
Amount: amountMinusFee,

Recipient: recipient,
Fee: parsedLog.Fee,
Expand All @@ -902,6 +903,7 @@ func (b *BackfillSuite) withdrawParity(log *types.Log, parser *parser.BridgePars
String: common.Bytes2Hex(parsedLog.Kappa[:]),
Valid: true,
}
amountMinusFee := new(big.Int).Sub(parsedLog.Amount, parsedLog.Fee)
var count int64
events := b.db.UNSAFE_DB().WithContext(b.GetTestContext()).Model(&sql.BridgeEvent{}).
Where(&sql.BridgeEvent{
Expand All @@ -911,7 +913,7 @@ func (b *BackfillSuite) withdrawParity(log *types.Log, parser *parser.BridgePars
BlockNumber: log.BlockNumber,
TxHash: log.TxHash.String(),
Token: parsedLog.Token.String(),
Amount: parsedLog.Amount,
Amount: amountMinusFee,

Recipient: recipient,
Fee: parsedLog.Fee,
Expand Down

0 comments on commit f09281b

Please sign in to comment.