Skip to content

Commit

Permalink
update the swap could not be completed as requested
Browse files Browse the repository at this point in the history
  • Loading branch information
tommasini committed Jul 2, 2024
1 parent c430b11 commit e56bd3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/core/RPCMethods/RPCMethodMiddleware.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
);
});

Expand Down
4 changes: 3 additions & 1 deletion app/core/RPCMethods/RPCMethodMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e56bd3b

Please sign in to comment.