Skip to content

Commit dcc100e

Browse files
authored
handle errors from GetLatestBlock (#79)
1 parent 0947947 commit dcc100e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/v1_1/generator.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,10 @@ func (g *Generator) generateDependenceInfo(ctx context.Context, contractName str
214214
}
215215
flowkit := getNetworkClient(n.Network, g.clients)
216216
if n.DependencyPinBlockHeight == 0 && flowkit != nil {
217-
block, _ := flowkit.Gateway().GetLatestBlock(ctx)
217+
block, err := flowkit.Gateway().GetLatestBlock(ctx)
218+
if err != nil {
219+
return nil, err
220+
}
218221
height := block.Height
219222

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

0 commit comments

Comments
 (0)