Skip to content

Commit

Permalink
handle errors from GetLatestBlock (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartolomej authored Sep 18, 2024
1 parent 0947947 commit dcc100e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/v1_1/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,10 @@ func (g *Generator) generateDependenceInfo(ctx context.Context, contractName str
}
flowkit := getNetworkClient(n.Network, g.clients)
if n.DependencyPinBlockHeight == 0 && flowkit != nil {
block, _ := flowkit.Gateway().GetLatestBlock(ctx)
block, err := flowkit.Gateway().GetLatestBlock(ctx)
if err != nil {
return nil, err
}
height := block.Height

details, err := g.GenerateDepPinDepthFirst(ctx, flowkit, n.Address, contractName, height)
Expand Down

0 comments on commit dcc100e

Please sign in to comment.