I'm new to programming in Javascript (I haven't even been programming for a month, but I have experience in other non-asynchronous languages).
I'm having trouble connecting the Firebase config to my website, sometimes it shows values, other times it doesn't.
if (app_data) {
console.log("Step 0");
remoteConfig = getRemoteConfig(app_data);
remoteConfig.settings.minimumFetchIntervalMillis = 10000;
} else {
console.log("No se ha podido conectar a la base de datos.");
}
if (fetchAndActivate(remoteConfig)) {
console.log("Paso por 2");
obj_config = getAll(remoteConfig);
console.log("Paso por 3");
Object.entries(obj_config).forEach((x) => {
const [key, entry] = x;
if (key === "contract_address") {
contract_token = entry["_value"];
console.log("Key Address: ", entry["_value"]);
}
console.log("Key: ", key);
console.log("Source: ", entry.getSource());
console.log("Value: ", JSON.stringify(entry["_value"]));
});
}
If someone could help me, I would be very grateful.
Greetings