Skip to content

Commit f486e9c

Browse files
authored
Merge pull request #347 from kleros/feat/support-for-old-solana-entries
fix: support for old solana's fork entries
2 parents 5c42800 + 324a94c commit f486e9c

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

src/components/rich-address-input.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@ import {
99

1010
const { Option } = Select
1111

12-
const chainOptions = references.map(reference => (
13-
<Option
14-
key={`${reference.namespaceId}:${reference.id}`}
15-
value={`${reference.namespaceId}:${reference.id}`}
16-
>
17-
{reference.name}
18-
</Option>
19-
))
12+
const chainOptions = references
13+
.filter(reference => !reference?.deprecated)
14+
.map(reference => (
15+
<Option
16+
key={`${reference.namespaceId}:${reference.id}`}
17+
value={`${reference.namespaceId}:${reference.id}`}
18+
>
19+
{reference.name}
20+
</Option>
21+
))
2022

2123
const defaultAddressType = `${references[0].namespaceId}:${references[0].id}`
2224

src/utils/rich-address.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
export type Reference = {
99
id: string
10+
deprecated?: boolean
1011
namespaceId: string
1112
name: string
1213
label: string
@@ -74,6 +75,14 @@ export const references: Reference[] = [
7475
label: 'BTC',
7576
explorer: 'mempool.space'
7677
},
78+
{
79+
deprecated: true,
80+
id: '4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ',
81+
namespaceId: 'solana',
82+
name: 'Solana',
83+
label: 'SOL',
84+
explorer: 'solscan.io'
85+
},
7786
{
7887
id: '5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',
7988
namespaceId: 'solana',

0 commit comments

Comments
 (0)