@@ -4,8 +4,15 @@ import { Chain, chains } from '@/chains';
4
4
import { ChainDiffSelector } from '@/components/ChainDiffSelector' ;
5
5
import { DiffMetadata } from '@/components/diff/DiffMetadata' ;
6
6
import { DiffPrecompiles } from '@/components/diff/DiffPrecompiles' ;
7
+ import { DiffSignatureTypes } from '@/components/diff/DiffSignatureTypes' ;
7
8
import { Toggle } from '@/components/ui/Toggle' ;
8
9
10
+ const SECTION_MAP : Record < string , string > = {
11
+ metadata : 'Metadata' ,
12
+ precompiles : 'Precompiles and Predeploys' ,
13
+ signatureTypes : 'Transaction and Signature Types' ,
14
+ } ;
15
+
9
16
const Diff = ( ) => {
10
17
// -------- Parse query parameters --------
11
18
@@ -43,17 +50,11 @@ const Diff = () => {
43
50
44
51
const [ onlyShowDiff , setOnlyShowDiff ] = useState ( true ) ;
45
52
46
- const SectionHeader = ( { section } : { section : string } ) => {
47
- if ( section === 'metadata' ) section = 'Metadata' ;
48
- else if ( section === 'precompiles' ) section = 'Precompiles and Predeploys' ;
49
-
50
- return (
51
- < h2 className = 'border-b border-zinc-500/10 text-center font-bold dark:border-zinc-500/20' >
52
- { section }
53
- </ h2 >
54
- ) ;
55
- } ;
56
-
53
+ const SectionHeader = ( { section } : { section : string } ) => (
54
+ < h2 className = 'border-b border-zinc-500/10 text-center font-bold dark:border-zinc-500/20' >
55
+ { SECTION_MAP [ section ] || section }
56
+ </ h2 >
57
+ ) ;
57
58
// We take `baseChain` and `targetChain` as arguments to ensure that they are not `undefined`
58
59
// and remove the need for `?` and `!` operators.
59
60
const DiffDiv = ( { baseChain, targetChain } : { baseChain : Chain ; targetChain : Chain } ) => {
@@ -81,6 +82,14 @@ const Diff = () => {
81
82
onlyShowDiff = { onlyShowDiff }
82
83
/>
83
84
) ;
85
+ } else if ( section === 'signatureTypes' ) {
86
+ content = (
87
+ < DiffSignatureTypes
88
+ base = { baseChain . signatureTypes }
89
+ target = { targetChain . signatureTypes }
90
+ onlyShowDiff = { onlyShowDiff }
91
+ />
92
+ ) ;
84
93
}
85
94
86
95
return (
0 commit comments