The Axios service is responsible for creating the default axios config that's been used for every single API call. For example:
import axios from "axios";
const customAxios = axios.create({
// The base URL of your api endpoint.
baseURL: process.env.REACT_APP_BUNDLER_API_URL
});
// Global axios headers used in every single api call.
customAxios.defaults.headers.common["Content-Type"] = "application/json";
customAxios.defaults.headers.post["Content-Type"] = "application/json";
customAxios.defaults.headers.common["Access-Control-Allow-Origin"] = "*";
export default customAxios;
PoRT
import { PoRT } from "@_koi/port";
let port = new PoRT({
trustedNodeAddress: process.env.REACT_APP_NODE_URL,
node: 5
});
export default port;
and this is to be used when you want to trigger an attention to the PoRT using propagatePoRT
import port from "services/port";
const nftId = -1BzhktwhTdIKDeQNOM5jW6LALHUSpoOMFUJAd_s1KY; // Random nft id
port.propagatePoRT(nftId);