Skip to content

Commit

Permalink
Revert "skip API swap에서 split_routes를 사용하도록 수정 & swap venue에 injectiv…
Browse files Browse the repository at this point in the history
…e-hallswap 추가 & ibc swap history 개선"

This reverts commit 4a47d4c.
  • Loading branch information
Thunnini committed Nov 11, 2024
1 parent a981c46 commit c9e01fe
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 32 deletions.
4 changes: 0 additions & 4 deletions apps/extension/src/config.ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,6 @@ export const SwapVenues: {
name: "injective-dojoswap",
chainId: "injective-1",
},
{
name: "injective-hallswap",
chainId: "injective-1",
},
{
name: "neutron-drop",
chainId: "neutron-1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ export const MsgRelationIBCSwapReceive: FunctionComponent<{
return chainStore.getChain("osmosis");
}

// legacy 코드임.
const swapVenue = msg.meta["swapVenue"];
if (swapVenue) {
const swapVenueChainId = SwapVenues.find(
Expand All @@ -105,17 +104,6 @@ export const MsgRelationIBCSwapReceive: FunctionComponent<{
}
}

// 나중에 satellite backend에서 swapVenueChainIdentifier meta field가 추가됨.
// msg.meta["swapVenue"]로 찾을 수 없을 경우 이걸 사용함.
const swapVenueChainIdentifier = msg.meta["swapVenueChainIdentifier"];
if (
typeof swapVenueChainIdentifier === "string" &&
swapVenueChainIdentifier &&
chainStore.hasChain(swapVenueChainIdentifier)
) {
return chainStore.getChain(swapVenueChainIdentifier);
}

return undefined;
})();

Expand Down
18 changes: 4 additions & 14 deletions apps/extension/src/pages/main/token-detail/msg-items/ibc-swap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,29 +83,19 @@ export const MsgRelationIBCSwap: FunctionComponent<{
return chainStore.getChain("osmosis");
}

// legacy 코드임.
const swapVenue = msg.meta["swapVenue"];
if (swapVenue) {
const swapVenueChainId = SwapVenues.find(
(venue) => venue.name === swapVenue
)?.chainId;

if (swapVenueChainId && chainStore.hasChain(swapVenueChainId)) {
return chainStore.getChain(swapVenueChainId);
if (swapVenueChainId) {
return chainStore.hasChain(swapVenueChainId)
? chainStore.getChain(swapVenueChainId)
: undefined;
}
}

// 나중에 satellite backend에서 swapVenueChainIdentifier meta field가 추가됨.
// msg.meta["swapVenue"]로 찾을 수 없을 경우 이걸 사용함.
const swapVenueChainIdentifier = msg.meta["swapVenueChainIdentifier"];
if (
typeof swapVenueChainIdentifier === "string" &&
swapVenueChainIdentifier &&
chainStore.hasChain(swapVenueChainIdentifier)
) {
return chainStore.getChain(swapVenueChainIdentifier);
}

return undefined;
})();

Expand Down
1 change: 0 additions & 1 deletion apps/stores-internal/src/skip/msgs-direct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ export class ObservableQueryMsgsDirectInner extends ObservableQuery<MsgsDirectRe
]
: [],
swap_venues: this.swapVenues,
smart_swap_options: { split_routes: true },
allow_unsafe: true,
}),
signal: abortController.signal,
Expand Down
1 change: 0 additions & 1 deletion apps/stores-internal/src/skip/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ export class ObservableQueryRouteInner extends ObservableQuery<RouteResponse> {
dest_asset_chain_id: this.destChainId,
cumulative_affiliate_fee_bps: this.affiliateFeeBps.toString(),
swap_venues: this.swapVenues,
smart_swap_options: { split_routes: true },
allow_unsafe: true,
}),
signal: abortController.signal,
Expand Down

0 comments on commit c9e01fe

Please sign in to comment.