@renegade-fi/core
Version:
VanillaJS library for Renegade
23 lines • 763 B
JavaScript
import { PAY_FEES_ROUTE } from '../constants.js';
import { postRelayerWithAuth } from '../utils/http.js';
import { getWalletId } from './getWalletId.js';
export async function payFees(config) {
const { getBaseUrl } = config;
const walletId = getWalletId(config);
try {
const res = await postRelayerWithAuth(config, getBaseUrl(PAY_FEES_ROUTE(walletId)));
if (res?.task_ids) {
res.task_ids.map((id) => {
console.log(`task pay-fees(${id}): ${walletId}`);
});
}
return { taskIds: res.task_ids };
}
catch (error) {
console.error(`wallet id: ${walletId} pay fees failed`, {
error,
});
throw error;
}
}
//# sourceMappingURL=payFees.js.map