From 78c51bb118f7b3e3a6029b826cf5ff22e43fd0ad Mon Sep 17 00:00:00 2001 From: Bart Date: Fri, 6 Sep 2024 00:30:57 +0200 Subject: [PATCH] handle errors from GetLatestBlock --- internal/v1_1/generator.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/v1_1/generator.go b/internal/v1_1/generator.go index c74bd4e..72187f2 100644 --- a/internal/v1_1/generator.go +++ b/internal/v1_1/generator.go @@ -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)