From c715076afb4495ad2eb79299bfaf943a17c4b162 Mon Sep 17 00:00:00 2001 From: Major Date: Sun, 10 Nov 2024 11:30:43 +0100 Subject: [PATCH] fix: sorting len --- external/vaults/prepare.getVaults.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/external/vaults/prepare.getVaults.go b/external/vaults/prepare.getVaults.go index 7d3b69c5..71212fd8 100644 --- a/external/vaults/prepare.getVaults.go +++ b/external/vaults/prepare.getVaults.go @@ -214,6 +214,9 @@ func getVaults( if end > uint64(len(data)) { end = uint64(len(data)) } + if start >= uint64(len(data)) { + return []TSimplifiedExternalVault{} + } data = data[start:end] logs.Pretty(len(data))