Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor-malene committed Mar 14, 2024
1 parent e1b02ae commit adb6479
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go/host/rpc/clientapi/client_api_eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (api *EthereumAPI) GetBlockByHash(_ context.Context, hash gethcommon.Hash,
}

// GasPrice is a placeholder for an RPC method required by MetaMask/Remix.
func (api *EthereumAPI) GasPrice(context.Context) (*hexutil.Big, error) {
func (api *EthereumAPI) GasPrice() (*hexutil.Big, error) {
header, err := api.host.DB().GetHeadBatchHeader()
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion integration/obscurogateway/tengateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ func testErrorHandling(t *testing.T, httpURL, wsURL string, w wallet.Wallet) {
require.NoError(t, err)

// make requests to geth for comparison

for _, req := range []string{
`{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}`,
`{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params": ["latest", false],"id":1}`,
`{"jsonrpc":"2.0","method":"eth_feeHistory","params":[1, "latest", [50]],"id":1}`,
`{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xA58C60cc047592DE97BF1E8d2f225Fc5D959De77", "latest"],"id":1}`,
Expand Down
4 changes: 3 additions & 1 deletion tools/walletextension/rpcapi/ethereum_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package rpcapi

import (
"context"
"math/big"
"time"

"github.com/ethereum/go-ethereum/common/hexutil"
Expand All @@ -19,7 +20,8 @@ func NewEthereumAPI(we *Services,
}

func (api *EthereumAPI) GasPrice(ctx context.Context) (*hexutil.Big, error) {
return UnauthenticatedTenRPCCall[hexutil.Big](ctx, api.we, &CacheCfg{TTL: shortCacheTTL}, "eth_gasPrice")
return (*hexutil.Big)(big.NewInt(int64(0x3b9aca00))), nil
// return UnauthenticatedTenRPCCall[hexutil.Big](ctx, api.we, &CacheCfg{TTL: shortCacheTTL}, "eth_gasPrice")
}

func (api *EthereumAPI) MaxPriorityFeePerGas(ctx context.Context) (*hexutil.Big, error) {
Expand Down

0 comments on commit adb6479

Please sign in to comment.