From d37e44bec94fb237331c84e49db378219946ba6d Mon Sep 17 00:00:00 2001 From: Willem Wyndham Date: Thu, 29 Aug 2024 12:21:36 +0200 Subject: [PATCH] fix: remove hack to remove unnecessary line in CLI event output --- features/dapp_develop/cli.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/features/dapp_develop/cli.go b/features/dapp_develop/cli.go index d4013bd..076e2d7 100644 --- a/features/dapp_develop/cli.go +++ b/features/dapp_develop/cli.go @@ -99,14 +99,6 @@ func getEventsFromCliTool(ledgerFrom uint32, deployedContractId string, size uin return jsonEvents, fmt.Errorf("soroban cli get events had error %v, %v", status, err) } - if len(stdOutLines) > 0 { - // some output was produced to console by the cli events command, - // it could represent a correct or bad result, but need to remove the last line of it regardless - // because if it's correct results will have a last line of 'Latest Ledger: xxxx', which needs to be removed to - // parse the rest as valid json, - stdOutLinesTrimmed = stdOutLines[:len(stdOutLines)-1] - } - // put commas between any json event objects if more than one found stdOutEventsValidJson := strings.ReplaceAll(strings.Join(stdOutLinesTrimmed, "\n"), `\n}\n{\n`, `\n}\n,\n{\n`) // wrap the json objects in json array brackets