Skip to content

Commit

Permalink
Merge pull request #3798 from TrueBlocks/bugfix/slurp_covalent_panic
Browse files Browse the repository at this point in the history
Fixed panic when slurping Covalent
  • Loading branch information
dszlachta authored Jul 5, 2024
2 parents 4314145 + 261fd71 commit 37987e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/apps/chifra/pkg/rpc/provider/covalent.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,18 @@ type covalentTransaction struct {
}

func (c *covalentTransaction) Slurp() (s types.Slurp) {
to := ""
if c.To != nil {
to = *c.To
}
s = types.Slurp{
BlockHash: base.HexToHash(*c.BlockHash),
BlockNumber: base.Blknum(*c.BlockHeight),
From: base.HexToAddress(*c.From),
Gas: base.Gas(*c.GasSpent),
IsError: !(*c.Successful),
Timestamp: base.Timestamp(c.BlockSignedAt.Unix()),
To: base.HexToAddress(*c.To),
To: base.HexToAddress(to),
TransactionIndex: base.Txnum(*c.TxOffset),
Value: *c.Value,
}
Expand Down

0 comments on commit 37987e1

Please sign in to comment.