@@ -5,9 +5,8 @@ import { selectActiveNetwork } from 'store/network/slice'
55import { NetworkVMType } from '@avalabs/core-chains-sdk'
66import RNWebView from 'react-native-webview'
77import Logger from 'utils/Logger'
8- import { RpcMethod } from 'store/rpc/types'
98import { createInAppRequest } from 'store/rpc/utils/createInAppRequest'
10- import { RpcMethod as VmModuleRpcMethod } from '@avalabs/vm-module-types'
9+ import { RpcMethod } from '@avalabs/vm-module-types'
1110import { getEvmCaip2ChainId } from 'utils/caip2ChainIds'
1211import { buildEvmProviderShim } from './evmProviderShim'
1312
@@ -49,13 +48,13 @@ const READ_ONLY_METHODS = new Set([
4948] )
5049
5150const SIGNING_METHODS : Record < string , RpcMethod > = {
52- eth_sendTransaction : RpcMethod . ETH_SEND_TRANSACTION ,
53- personal_sign : RpcMethod . PERSONAL_SIGN ,
54- eth_sign : RpcMethod . ETH_SIGN ,
55- eth_signTypedData : RpcMethod . SIGN_TYPED_DATA ,
56- eth_signTypedData_v1 : RpcMethod . SIGN_TYPED_DATA_V1 ,
57- eth_signTypedData_v3 : RpcMethod . SIGN_TYPED_DATA_V3 ,
58- eth_signTypedData_v4 : RpcMethod . SIGN_TYPED_DATA_V4
51+ [ RpcMethod . ETH_SEND_TRANSACTION ] : RpcMethod . ETH_SEND_TRANSACTION ,
52+ [ RpcMethod . PERSONAL_SIGN ] : RpcMethod . PERSONAL_SIGN ,
53+ [ RpcMethod . ETH_SIGN ] : RpcMethod . ETH_SIGN ,
54+ [ RpcMethod . SIGN_TYPED_DATA ] : RpcMethod . SIGN_TYPED_DATA ,
55+ [ RpcMethod . SIGN_TYPED_DATA_V1 ] : RpcMethod . SIGN_TYPED_DATA_V1 ,
56+ [ RpcMethod . SIGN_TYPED_DATA_V3 ] : RpcMethod . SIGN_TYPED_DATA_V3 ,
57+ [ RpcMethod . SIGN_TYPED_DATA_V4 ] : RpcMethod . SIGN_TYPED_DATA_V4
5958}
6059
6160/**
@@ -168,7 +167,7 @@ export function useEvmInjectedProvider(
168167
169168 try {
170169 const result = await request ( {
171- method : rpcMethod as unknown as VmModuleRpcMethod ,
170+ method : rpcMethod ,
172171 params,
173172 chainId : caip2ChainId
174173 } )
0 commit comments