Skip to content

Commit f833f56

Browse files
hotfix: explorer new version (#1707)
1 parent e7c447a commit f833f56

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

explorer/lib/explorer_web/live/pages/batches/index.html.heex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
type="number"
3535
class={
3636
classes([
37-
"border border-foreground/20 text-muted-foreground w-20 focus:ring-primary",
37+
"text-center border border-foreground/20 text-muted-foreground w-20 focus:ring-primary",
3838
"phx-submit-loading:opacity-75 rounded-lg bg-card hover:bg-muted py-2 px-3",
3939
"text-sm font-semibold leading-6 text-foregound active:text-foregound/80",
4040
"[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none"

explorer/lib/explorer_web/live/pages/home/index.ex

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,21 @@ defmodule ExplorerWeb.Home.Index do
4242
%{
4343
title: "Proofs verified",
4444
value: Helpers.convert_number_to_shorthand(verified_proofs),
45-
tooltip_text: "= #{Helpers.format_number(verified_proofs)} proofs",
45+
tooltip_text:
46+
case verified_proofs >= 1000 do
47+
true -> "= #{Helpers.format_number(verified_proofs)} proofs"
48+
_ -> nil
49+
end,
4650
link: nil
4751
},
4852
%{
4953
title: "Total batches",
5054
value: Helpers.convert_number_to_shorthand(verified_batches),
51-
tooltip_text: "= #{Helpers.format_number(verified_batches)} batches",
55+
tooltip_text:
56+
case verified_batches >= 1000 do
57+
true -> "= #{Helpers.format_number(verified_batches)} batches"
58+
_ -> nil
59+
end,
5260
link: nil
5361
},
5462
%{

explorer/lib/explorer_web/live/pages/home/index.html.heex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<div class="flex flex-wrap md:flex-row flex-col gap-5">
3535
<.card
3636
title="Cost per proof"
37-
subtitle="Cost of proving over time"
37+
subtitle="Verification cost over time"
3838
class="p-0 flex-1"
3939
header_container_class="px-10 pt-8"
4040
>

explorer/lib/explorer_web/live/utils.ex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ defmodule ExplorerWeb.Helpers do
77
end
88
end
99

10+
def convert_number_to_shorthand(number) when number >= 1_000_000_000 do
11+
formatted_number = Float.round(number / 1_000_000_000, 2)
12+
"#{remove_trailing_zeros(formatted_number)}B"
13+
end
14+
1015
def convert_number_to_shorthand(number) when number >= 1_000_000 do
1116
formatted_number = Float.round(number / 1_000_000, 2)
1217
"#{remove_trailing_zeros(formatted_number)}M"

0 commit comments

Comments
 (0)