UNPKG

@renegade-fi/core

Version:
20 lines 735 B
import { WALLET_ORDERS_ROUTE } from "../constants.js"; import { postRelayerWithAuth } from "../utils/http.js"; import { getWalletId } from "./getWalletId.js"; export async function createOrderRequest(config, parameters) { const { request } = parameters; const { getBaseUrl } = config; const walletId = getWalletId(config); try { const res = await postRelayerWithAuth(config, getBaseUrl(WALLET_ORDERS_ROUTE(walletId)), request); console.log(`task update-wallet(${res.task_id}): ${walletId}`); return { taskId: res.task_id }; } catch (error) { console.error(`${walletId}`, { error, }); throw error; } } //# sourceMappingURL=createOrderRequest.js.map