Skip to content

Commit fb1d7c9

Browse files
committed
feat: disable raw trace
1 parent 83bc6c9 commit fb1d7c9

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

configs/app/features/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export { default as multichainButton } from './multichainButton';
2626
export { default as nameService } from './nameService';
2727
export { default as pools } from './pools';
2828
export { default as publicTagsSubmission } from './publicTagsSubmission';
29+
export { default as rawTrace } from './rawTrace';
2930
export { default as restApiDocs } from './restApiDocs';
3031
export { default as rewards } from './rewards';
3132
export { default as rollbar } from './rollbar';

configs/app/features/rawTrace.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import type { Feature } from './types';
2+
3+
import { getEnvValue } from '../utils';
4+
5+
const title = 'Raw trace';
6+
7+
const config: Feature<{ isEnabled: true | false }> = (() => {
8+
const isEnabled = getEnvValue('NEXT_PUBLIC_ENABLE_RAW_TRACE') === 'true';
9+
10+
return Object.freeze({
11+
title,
12+
isEnabled,
13+
});
14+
})();
15+
16+
export default config;

ui/pages/Transaction.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ const TransactionPageContent = () => {
6868
undefined,
6969
{ id: 'logs', title: 'Logs', component: <TxLogs txQuery={ txQuery }/> },
7070
{ id: 'state', title: 'State', component: <TxState txQuery={ txQuery }/> },
71-
{ id: 'raw_trace', title: 'Raw trace', component: <TxRawTrace txQuery={ txQuery }/> },
71+
config.features.rawTrace.isEnabled ?
72+
{ id: 'raw_trace', title: 'Raw trace', component: <TxRawTrace txQuery={ txQuery }/> } : undefined,
7273
txQuery.data?.authorization_list?.length ?
7374
{ id: 'authorizations', title: 'Authorizations', component: <TxAuthorizations txQuery={ txQuery }/> } :
7475
undefined,

0 commit comments

Comments
 (0)