UNPKG

coctohug-web

Version:

- Nice localization with support of dozens of languages: [English](https://github.com/raingggg/coctohug/blob/main/readme_en.md), [العربية](https://github.com/raingggg/coctohug/blob/main/readme_ar.md), [Bulgarian](https://github.com/raingggg/coctohug/blob/

34 lines (29 loc) 776 B
const axios = require('axios'); const { logger } = require('../utils/logger'); const { blockchainConfig: { blockchain }, getHostname, getControllerUrl, } = require('../utils/chiaConfig'); const { loadPlotnftShow } = require('../utils/chiaClient'); const hostname = getHostname(); const controllerUrl = getControllerUrl(); const updateWallet = async () => { try { const data = await loadPlotnftShow(); const payload = { hostname, blockchain, details: data, }; const finalUrl = `${controllerUrl}/plotnfts/update`; await axios.post(finalUrl, payload).catch(function (error) { logger.error('plotnfts/update', finalUrl); }); } catch (e) { logger.error('updateWallet', e); } }; module.exports = { updateWallet }