Skip to content

Commit

Permalink
✨ preview: decode units
Browse files Browse the repository at this point in the history
  • Loading branch information
cruzdanilo committed Dec 3, 2024
1 parent 1dbde23 commit 4a7d6d1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions developer-preview/src/lib/getPreviewData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ const processFields = (
);
break;
}
case "unit":
displayValue = `${
Number(value) / 10 ** Number(field.params?.decimals ?? 0)
}${field.params?.base ? ` ${String(field.params.base)}` : ""}`;
break;
case "addressName":
if (
typeof value === "string" &&
Expand Down

0 comments on commit 4a7d6d1

Please sign in to comment.