@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
17 lines • 642 B
JavaScript
import network from "@ledgerhq/live-network/network";
import { mockGetStatus } from "./mock";
import { isIntegrationTestEnv } from "./utils/isIntegrationTestEnv";
import { getSwapAPIBaseURL, getSwapUserIP } from ".";
export const getMultipleStatus = async (statusList) => {
if (isIntegrationTestEnv())
return mockGetStatus(statusList);
const headers = getSwapUserIP();
const res = await network({
method: "POST",
url: `${getSwapAPIBaseURL()}/swap/status`,
data: statusList,
...(headers !== undefined ? { headers } : {}),
});
return res.data;
};
//# sourceMappingURL=getStatus.js.map