diff --git a/src/wallet.test.ts b/src/wallet.test.ts index da7a69a..27cd1fa 100644 --- a/src/wallet.test.ts +++ b/src/wallet.test.ts @@ -478,51 +478,6 @@ describe('wallet', () => { }); }); - it('should not throw if verifyingContract is "cosmos"', async () => { - const { engine } = createTestSetup(); - const getAccounts = async () => testAddresses.slice(); - const witnessedMsgParams: TypedMessageParams[] = []; - const processTypedMessageV3 = async (msgParams: TypedMessageParams) => { - witnessedMsgParams.push(msgParams); - // Assume testMsgSig is the expected signature result - return testMsgSig; - }; - - engine.push(createWalletMiddleware({ getAccounts, processTypedMessageV3 })); - - const message = { - types: { - EIP712Domain: [ - { name: 'name', type: 'string' }, - { name: 'version', type: 'string' }, - { name: 'chainId', type: 'uint256' }, - { name: 'verifyingContract', type: 'address' }, - ], - }, - primaryType: 'EIP712Domain', - message: {}, - domain: { - verifyingContract: 'cosmos', - }, - }; - - const stringifiedMessage = JSON.stringify(message); - - const payload = { - method: 'eth_signTypedData_v3', - params: [testAddresses[0], stringifiedMessage], // Assuming testAddresses[0] is a valid address from your setup - }; - - const promise = pify(engine.handle).call(engine, payload); - const result = await promise; - expect(result).toStrictEqual({ - id: undefined, - jsonrpc: undefined, - result: - '0x68dc980608bceb5f99f691e62c32caccaee05317309015e9454eba1a14c3cd4505d1dd098b8339801239c9bcaac3c4df95569dcf307108b92f68711379be14d81c', - }); - }); - describe('signTypedDataV4', () => { const getMsgParams = (verifyingContract?: string) => ({ types: {