Skip to content

Commit

Permalink
Fix a mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
Thunnini committed Jan 5, 2024
1 parent bbc110d commit 68aa3fe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/extension/src/hooks/ibc-swap/amount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ export class IBCSwapAmountConfig extends AmountConfig {
queryMsgsDirect.response.data
);

console.log({
swapRouterKey,
key,
});
if (swapRouterKey !== key) {
throw new Error(
"Route and msgs_direct are not matched. Please try again."
Expand Down Expand Up @@ -372,15 +376,15 @@ export class IBCSwapAmountConfig extends AmountConfig {
const obj = JSON.parse(memo);
for (const operation of obj.wasm.msg.swap_and_action.user_swap
.swap_exact_asset_in.operations) {
key = `/${operation.pool}/${operation.denom_in}/${operation.denom_out}`;
key += `/${operation.pool}/${operation.denom_in}/${operation.denom_out}`;
}
}
}
if (msg.msg_type_url === "/cosmwasm.wasm.v1.MsgExecuteContract") {
const obj = JSON.parse(msg.msg);
for (const operation of obj.msg.swap_and_action.user_swap
.swap_exact_asset_in.operations) {
key = `/${operation.pool}/${operation.denom_in}/${operation.denom_out}`;
key += `/${operation.pool}/${operation.denom_in}/${operation.denom_out}`;
}
}
}
Expand Down

0 comments on commit 68aa3fe

Please sign in to comment.