Skip to content

Commit

Permalink
update friendly msg error
Browse files Browse the repository at this point in the history
  • Loading branch information
haunv3 committed Feb 16, 2024
1 parent a46da8b commit 20486cd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/universal-swap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oraichain/oraidex-universal-swap",
"version": "1.0.50",
"version": "1.0.51",
"main": "build/index.js",
"files": [
"build/"
Expand Down
2 changes: 1 addition & 1 deletion packages/universal-swap/src/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ export class UniversalSwapHandler {

return [msg];
} catch (error) {
throw generateError(`Error generateMsgsSwap: ${error}`);
throw generateError(`Error generateMsgsSwap: ${JSON.stringify(error)}`);
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/universal-swap/src/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ export const simulateSwap = async (query: {
if (!isSimulatingRatio) return data;
return { amount: data.amount.substring(0, data.amount.length - 1) };
} catch (error) {
throw new Error(`Error when trying to simulate swap using router v2: ${error}`);
throw new Error(`Error when trying to simulate swap using router v2: ${JSON.stringify(error)}`);
}
};

Expand Down

0 comments on commit 20486cd

Please sign in to comment.