Skip to content

Commit 99932af

Browse files
committed
fix(TxOverview): gas used max width 100
1 parent b1de149 commit 99932af

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/modules/tx/TxOverview.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ const handleViewRawEvents = () => {
155155

156156
<div :class="$style.gas_bar">
157157
<div
158-
:style="{ width: `${(tx.gas_used * 100) / tx.gas_wanted}%` }"
158+
:style="{
159+
width: `${(tx.gas_used * 100) / tx.gas_wanted > 100 ? 100 : (tx.gas_used * 100) / tx.gas_wanted}%`,
160+
}"
159161
:class="[$style.gas_used, (tx.gas_used * 100) / tx.gas_wanted > 100 && $style.error]"
160162
/>
161163
</div>

0 commit comments

Comments
 (0)