Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update soroswap-router-sdk and add get pairs from zephyr #458

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
abstract829 committed Jun 7, 2024
commit ac1f2152359b9e5daf514dc67dce3466c2828e06
9 changes: 0 additions & 9 deletions src/functions/generateRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ import { CurrencyAmount, Networks, Protocols, Router, Token, TradeType } from 's
import { AppContext } from 'contexts';
import axios from 'axios';

const backendUrl = process.env.NEXT_PUBLIC_SOROSWAP_BACKEND_URL;
const backendApiKey = process.env.NEXT_PUBLIC_SOROSWAP_BACKEND_API_KEY;

export interface GenerateRouteProps {
amountTokenAddress: string;
quoteTokenAddress: string;
Expand All @@ -30,12 +27,6 @@ export const useRouterSDK = () => {
const network = sorobanContext.activeChain?.networkPassphrase as Networks;

const router = useMemo(() => {
if (!backendUrl || !backendApiKey) {
throw new Error(
'NEXT_PUBLIC_SOROSWAP_BACKEND_URL and NEXT_PUBLIC_SOROSWAP_BACKEND_API_KEY must be set in the environment variables.',
);
}

return new Router({
getPairsFn: async () => {
let queryNetwork = queryNetworkDict[network];
Expand Down