Skip to content

Commit

Permalink
remove it (#1480)
Browse files Browse the repository at this point in the history
  • Loading branch information
fan-zhang-sv authored Jan 16, 2025
1 parent 59a6feb commit 16fe772
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/wallet-sdk/src/CoinbaseWalletProvider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe('Ephemeral methods', () => {
});

it('should pass args to SCWSigner', async () => {
const args = { method: 'wallet_sign', params: ['0xdeadbeef'] };
const args = { method: 'wallet_sendCalls', params: ['0xdeadbeef'] };
expect(provider['signer']).toBeNull();
await provider.request(args);
expect(mockHandshake).toHaveBeenCalledWith({ method: 'handshake' });
Expand Down
3 changes: 1 addition & 2 deletions packages/wallet-sdk/src/CoinbaseWalletProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ export class CoinbaseWalletProvider extends ProviderEventEmitter implements Prov
storeSignerType(signerType);
break;
}
case 'wallet_sendCalls':
case 'wallet_sign': {
case 'wallet_sendCalls': {
const ephemeralSigner = this.initSigner('scw');
await ephemeralSigner.handshake({ method: 'handshake' }); // exchange session keys
const result = await ephemeralSigner.request(args); // send diffie-hellman encrypted request
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-sdk/src/sign/scw/SCWSigner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ describe('SCWSigner', () => {
});

describe('request - using ephemeral SCWSigner', () => {
it.each(['wallet_sign', 'wallet_sendCalls'])(
it.each(['wallet_sendCalls'])(
'should perform a successful request after handshake',
async (method) => {
const mockRequest: RequestArguments = { method };
Expand Down
1 change: 0 additions & 1 deletion packages/wallet-sdk/src/sign/scw/SCWSigner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ export class SCWSigner implements Signer {
if (this.accounts.length === 0) {
switch (request.method) {
case 'wallet_sendCalls':
case 'wallet_sign':
return this.sendRequestToPopup(request);
default:
throw standardErrors.provider.unauthorized();
Expand Down

0 comments on commit 16fe772

Please sign in to comment.