Skip to content

Commit

Permalink
some debugging infos
Browse files Browse the repository at this point in the history
  • Loading branch information
esterlus committed May 30, 2024
1 parent abfd318 commit d195043
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions frontend/src/Icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ function Icon(props) {
async function getIcon(ethAddress) {
set_ethAddress(ethAddress);
try {
console.log("fetching",`https://${props.serverurl}/logo/${ethAddress}`);
const rez = await fetch(`https://${props.serverurl}/logo/${ethAddress}`, { cache: "no-store" })
console.log("resp",rez);
const blob = await rez.blob();
console.log("blob",blob);
const icon = URL.createObjectURL(blob);
console.log("icon",icon);
set_icon(icon);
} catch (e) {
console.warn(`No icon for ${ethAddress}`, e)
Expand All @@ -30,9 +34,13 @@ function Icon(props) {
async function getIcon_uHTTP(ethAddress) {
set_ethAddress(ethAddress);
try {
console.log("[uHTTP] fetching",`https://${props.serverurl}/logo/${ethAddress}`);
const rez = await props.uHTTP.fetch(`https://${props.serverurl}/logo/${ethAddress}`)
console.log("[uHTTP] resp",rez);
const blob = await rez.blob();
console.log("[uHTTP] blob",blob);
const icon = URL.createObjectURL(blob);
console.log("[uHTTP] icon",icon);
set_icon(icon);
} catch (e) {
console.warn(`[uHTTP] No icon for ${ethAddress}`, e)
Expand Down

0 comments on commit d195043

Please sign in to comment.