From e99dc0831cf68960e05ddb8aaf58b8ab6f9ac4a7 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Sat, 18 Nov 2023 15:54:29 +0300 Subject: [PATCH] fix --- .github/workflows/api.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/api.yaml b/.github/workflows/api.yaml index ed09ee9..68da762 100644 --- a/.github/workflows/api.yaml +++ b/.github/workflows/api.yaml @@ -62,14 +62,15 @@ jobs: status_check=$(echo "$response" | jq -e '.block_id.hash' &> /dev/null && echo "true" || echo "false") elif [ "$type" = "tendermint-ws" ]; then - response=$(echo '{ "jsonrpc": "2.0", "method": "subscribe", "params": ["tm.event='\'NewBlock'\'"], "id": 1 }' | $websocat_path -t -1 "$url") - status_check=$(echo "$response" | jq -e '.result' &> /dev/null && echo "true" || echo "false") - fi - + response=$($websocat_path -t -1 "$url" <<'EOF' + { "jsonrpc": "2.0", "method": "subscribe", "params": ["tm.event='NewBlock'"], "id": 1 } + EOF + ) + status_check=$(echo "$response" | jq -e '.result' &> /dev/null && echo "true" || echo "false") else - echo "⏭️ Skipping unsupported endpoint type: $type" - status_check="skip" - fi + echo "⏭️ Skipping unsupported endpoint type: $type" + status_check="skip" + fi if [ "$status_check" = "true" ]; then echo "✅ $url - Successful"