Skip to content

Commit d4d156d

Browse files
authored
Merge pull request #2198 from oasisprotocol/mz/gasUsed
Show gas used in Consensus transaction details
2 parents 46b2a1d + f1929b4 commit d4d156d

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

.changelog/2198.trivial.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Show gas used in Consensus transaction details

src/app/pages/ConsensusBlockDetailPage/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export const ConsensusBlockDetailView: FC<{
169169
{t('common.valuePair', {
170170
value: block.gas_limit,
171171
})}
172-
{block.gas_limit === '0' && ` ${t('block.unlimited')}`}
172+
{block.gas_limit === 0 && ` ${t('block.unlimited')}`}
173173
</dd>
174174
</>
175175
)}

src/app/pages/ConsensusTransactionDetailPage/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ export const ConsensusTransactionDetailView: FC<{
203203
})}
204204
</dd>
205205

206-
{/* TODO: gasUsed field will be available for Nexus with the next oasis-core release */}
206+
<dt>{t('common.gasUsed')}</dt>
207+
<dd>{transaction.gas_used ? transaction.gas_used.toLocaleString() : t('common.missing')}</dd>
207208

208209
{transaction.gas_limit && (
209210
<>

src/oasis-nexus/generated/api.ts

Lines changed: 17 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)