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

Fix/fix sell card calls #84

Merged
merged 11 commits into from
Sep 23, 2024
Merged

Fix/fix sell card calls #84

merged 11 commits into from
Sep 23, 2024

Conversation

sarneijim
Copy link
Collaborator

Support sell confirm

@sarneijim sarneijim marked this pull request as ready for review September 23, 2024 06:22
Comment on lines -8 to 30
const SELL_BACKEND_URL = "https://buy.api.aws.prd.ldg-tech.com/sell/v1";
const SELL_BACKEND_URL = "https://buy.api.aws.prd.ldg-tech.com/";

let axiosClient = axios.create({

let swapAxiosClient = axios.create({
baseURL: SWAP_BACKEND_URL,
});

let sellAxiosClient = axios.create({
baseURL: SELL_BACKEND_URL,
});

/**
* Override the default axios client base url environment (default is production)
* @param {string} url
*/
export function setBackendUrl(url: string) {
axiosClient = axios.create({
swapAxiosClient = axios.create({
baseURL: url,
});
sellAxiosClient = axios.create({
baseURL: url,
});
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it works, simple way to manage both backend URL
But I really think it should not matter and the live app creating an exchangeSDK instance should always pass the URL needed

@sarneijim sarneijim merged commit 0c5c770 into main Sep 23, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants