From 7dab635f5a6f126871db5728d064bd44def42a6c Mon Sep 17 00:00:00 2001 From: thiagodeev Date: Mon, 27 May 2024 21:26:18 -0300 Subject: [PATCH] Revert errors.go changes and update RPC links on .yml files --- .github/workflows/main_ci_check.yml | 4 ++-- .github/workflows/test_rpc.yml | 4 ++-- rpc/errors.go | 6 ------ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main_ci_check.yml b/.github/workflows/main_ci_check.yml index 799fb929..c42c0c97 100644 --- a/.github/workflows/main_ci_check.yml +++ b/.github/workflows/main_ci_check.yml @@ -44,7 +44,7 @@ jobs: #run: cd rpc && go test -timeout 1200s -v -env testnet . env: TESTNET_ACCOUNT_PRIVATE_KEY: ${{ secrets.TESTNET_ACCOUNT_PRIVATE_KEY }} - INTEGRATION_BASE: "https://starknet-goerli.cartridge.gg/" + INTEGRATION_BASE: "https://free-rpc.nethermind.io/sepolia-juno" # Test rpc on mainnet - name: Test RPC with mainnet @@ -52,7 +52,7 @@ jobs: #run: cd rpc && go test -timeout 600s -v -env mainnet . env: TESTNET_ACCOUNT_PRIVATE_KEY: ${{ secrets.TESTNET_ACCOUNT_PRIVATE_KEY }} - INTEGRATION_BASE: "https://starknet.cartridge.gg/" + INTEGRATION_BASE: "https://free-rpc.nethermind.io/mainnet-juno" # Test Account on devnet - name: Test Account on devnet diff --git a/.github/workflows/test_rpc.yml b/.github/workflows/test_rpc.yml index 4952f4ff..35291f5a 100644 --- a/.github/workflows/test_rpc.yml +++ b/.github/workflows/test_rpc.yml @@ -46,7 +46,7 @@ jobs: #run: cd rpc && go test -timeout 1200s -v -env testnet . env: TESTNET_ACCOUNT_PRIVATE_KEY: ${{ secrets.TESTNET_ACCOUNT_PRIVATE_KEY }} - INTEGRATION_BASE: "https://starknet-goerli.cartridge.gg/" + INTEGRATION_BASE: "https://free-rpc.nethermind.io/sepolia-juno" # Test rpc on mainnet - name: Test RPC with mainnet @@ -54,4 +54,4 @@ jobs: #run: cd rpc && go test -timeout 600s -v -env mainnet . env: TESTNET_ACCOUNT_PRIVATE_KEY: ${{ secrets.TESTNET_ACCOUNT_PRIVATE_KEY }} - INTEGRATION_BASE: "https://starknet.cartridge.gg/" + INTEGRATION_BASE: "https://free-rpc.nethermind.io/mainnet-juno" diff --git a/rpc/errors.go b/rpc/errors.go index 301ad3a0..95b31f23 100644 --- a/rpc/errors.go +++ b/rpc/errors.go @@ -3,7 +3,6 @@ package rpc import ( "encoding/json" "errors" - "fmt" ) var ErrNotImplemented = errors.New("not implemented") @@ -64,7 +63,6 @@ func tryUnwrapToRPCErr(err error, rpcErrors ...*RPCError) *RPCError { return &nodeErr } } - return Err(InternalError, err.Error()) } @@ -75,10 +73,6 @@ type RPCError struct { } func (e RPCError) Error() string { - if _, ok := e.Data.(string); !ok { - return fmt.Sprintf("%s: %v", e.Message, e.Data) - } - return e.Message }