@renegade-fi/core
Version:
VanillaJS library for Renegade
19 lines • 873 B
JavaScript
import { DEPOSIT_BALANCE_ROUTE } from "../constants.js";
import { postRelayerWithAuth } from "../utils/http.js";
import { getWalletId } from "./getWalletId.js";
export async function depositRequest(config, parameters) {
const { request } = parameters;
const { getBaseUrl } = config;
const walletId = getWalletId(config);
const logger = config.getLogger("core:actions:depositRequest");
try {
const res = await postRelayerWithAuth(config, getBaseUrl(DEPOSIT_BALANCE_ROUTE(walletId)), request);
logger.debug(`task update-wallet(${res.task_id})`, { walletId, taskId: res.task_id });
return { taskId: res.task_id };
}
catch (error) {
logger.error(`Deposit request failed: ${error instanceof Error ? error.message : String(error)}`, { walletId });
throw error;
}
}
//# sourceMappingURL=depositRequest.js.map