Skip to content

Commit

Permalink
remove deprecated _cbwallet_arbitrary
Browse files Browse the repository at this point in the history
  • Loading branch information
bangtoven committed Nov 21, 2023
1 parent 6747ed2 commit 3e98fb3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
19 changes: 0 additions & 19 deletions packages/wallet-sdk/src/provider/CoinbaseWalletProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -790,9 +790,6 @@ export class CoinbaseWalletProvider extends EventEmitter implements Web3Provider
case 'eth_signTypedData':
return this._eth_signTypedData_v4(params);

case 'cbWallet_arbitrary':
return this._cbwallet_arbitrary(params);

case 'wallet_addEthereumChain':
return this._wallet_addEthereumChain(params);

Expand Down Expand Up @@ -1152,22 +1149,6 @@ export class CoinbaseWalletProvider extends EventEmitter implements Web3Provider
return this._signEthereumMessage(message, address, false, typedDataJSON);
}

/** @deprecated */
private async _cbwallet_arbitrary(params: unknown[]): Promise<JSONRPCResponse> {
const action = params[0];
const data = params[1];
if (typeof data !== 'string') {
throw new Error('parameter must be a string');
}

if (typeof action !== 'object' || action === null) {
throw new Error('parameter must be an object');
}

const result = await this.genericRequest(action, data);
return { jsonrpc: '2.0', id: 0, result };
}

private async _wallet_addEthereumChain(params: unknown[]): Promise<JSONRPCResponse> {
const request = params[0] as AddEthereumChainParams;

Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-sdk/src/provider/Web3Provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the Apache License, version 2.0

import { Callback } from '../core/type';
import { JSONRPCRequest, JSONRPCResponse } from '../provider/JSONRPC';
import { JSONRPCRequest } from './JSONRPC';

export interface Web3Provider {
send(request: JSONRPCRequest): JSONRPCResponse;
Expand Down

0 comments on commit 3e98fb3

Please sign in to comment.