Skip to content

Commit

Permalink
Merge pull request #154 from oraichain/feat/friendly-msg-error
Browse files Browse the repository at this point in the history
update friendly msg error
  • Loading branch information
haunv3 authored Feb 16, 2024
2 parents a46da8b + 20486cd commit 8d8e83e
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 8d8e83e

Please sign in to comment.