diff --git a/app/core/RPCMethods/RPCMethodMiddleware.test.ts b/app/core/RPCMethods/RPCMethodMiddleware.test.ts index b30844faf29..c9e66248e53 100644 --- a/app/core/RPCMethods/RPCMethodMiddleware.test.ts +++ b/app/core/RPCMethods/RPCMethodMiddleware.test.ts @@ -1357,7 +1357,7 @@ describe('getRpcMethodMiddleware', () => { const response = await callMiddleware({ middleware, request }); //@ts-expect-error now the response can have an error property await expect(response?.error?.message).toStrictEqual( - 'This address does not exist', + 'The swap could not be completed as requested', ); }); diff --git a/app/core/RPCMethods/RPCMethodMiddleware.ts b/app/core/RPCMethods/RPCMethodMiddleware.ts index 22e6ae1e45a..94ee918b3a0 100644 --- a/app/core/RPCMethods/RPCMethodMiddleware.ts +++ b/app/core/RPCMethods/RPCMethodMiddleware.ts @@ -428,7 +428,9 @@ export const getRpcMethodMiddleware = ({ ); if (!dappConnectedAccount) { - throw rpcErrors.invalidParams('This address does not exist'); + throw rpcErrors.invalidParams( + 'The swap could not be completed as requested', + ); } // This condition is only needed until we support multiple source tokens swap