I’m working in react, using the connect wallet widget on the client side
const [authenticated, setAuthenticated] = useState(false);
const [address, setAddress] = useState(""); // State variable for authenticated address
const [serverMessage, setServerMessage] = useState("");
window.addEventListener("m-authenticated", async (event) => {
// Get the data client instance
const client = event.detail.client;
// Get the authenticated address from window.manifold and update state
if (window.manifold && window.manifold.address) {
setAddress(window.manifold.address);
}
setAuthenticated(true);
});
When I connect my wallet I get thrown a CORS error from manifold’s server
Access to fetch at 'https://identity.api.manifoldxyz.dev/badges?walletAddress=' from origin 'MYWEBSITEURL' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled