Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove hack to remove unnecessary line in CLI event output #103

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions features/dapp_develop/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading