Skip to content

Commit adb6479

Browse files
committed
fixes
1 parent e1b02ae commit adb6479

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

go/host/rpc/clientapi/client_api_eth.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func (api *EthereumAPI) GetBlockByHash(_ context.Context, hash gethcommon.Hash,
6767
}
6868

6969
// GasPrice is a placeholder for an RPC method required by MetaMask/Remix.
70-
func (api *EthereumAPI) GasPrice(context.Context) (*hexutil.Big, error) {
70+
func (api *EthereumAPI) GasPrice() (*hexutil.Big, error) {
7171
header, err := api.host.DB().GetHeadBatchHeader()
7272
if err != nil {
7373
return nil, err

integration/obscurogateway/tengateway_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,8 @@ func testErrorHandling(t *testing.T, httpURL, wsURL string, w wallet.Wallet) {
393393
require.NoError(t, err)
394394

395395
// make requests to geth for comparison
396-
397396
for _, req := range []string{
397+
`{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}`,
398398
`{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params": ["latest", false],"id":1}`,
399399
`{"jsonrpc":"2.0","method":"eth_feeHistory","params":[1, "latest", [50]],"id":1}`,
400400
`{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xA58C60cc047592DE97BF1E8d2f225Fc5D959De77", "latest"],"id":1}`,

tools/walletextension/rpcapi/ethereum_api.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package rpcapi
22

33
import (
44
"context"
5+
"math/big"
56
"time"
67

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

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

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

0 commit comments

Comments
 (0)