UNPKG

@renegade-fi/core

Version:
21 lines 713 B
import { REFRESH_WALLET_ROUTE } from "../constants.js"; import { postRelayerWithAuth } from "../utils/http.js"; import { getWalletId } from "./getWalletId.js"; export async function refreshWallet(config) { const { getBaseUrl } = config; const walletId = getWalletId(config); try { const res = await postRelayerWithAuth(config, getBaseUrl(REFRESH_WALLET_ROUTE(walletId))); if (res?.task_id) { console.log(`task refresh-wallet(${res.task_id}): ${walletId}`); } return { taskId: res.task_id }; } catch (error) { console.error(`${walletId}`, { error, }); throw error; } } //# sourceMappingURL=refreshWallet.js.map