mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-04-21 23:37:57 +00:00
fix: add Pezkuwi networks to account address prefix options
Add custom Pezkuwi networks to SS58 address prefix dropdown since they are not in the upstream @substrate/ss58-registry package: - Pezkuwi Relay Chain (prefix: 0) - Dicle Relay Chain (prefix: 2) - Zagros Testnet (prefix: 42) - PezkuwiChain Development (prefix: 42) Also filter out polkadot/kusama from the list as they are replaced by pezkuwi/dicle in this project. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,12 +6,41 @@ import type { Option } from './types.js';
|
||||
|
||||
import { selectableNetworks } from '@pezkuwi/networks';
|
||||
|
||||
const networks = selectableNetworks
|
||||
.map(({ displayName, network, prefix }) => ({
|
||||
info: network,
|
||||
text: displayName,
|
||||
value: prefix
|
||||
}))
|
||||
// Pezkuwi custom networks (not in upstream ss58-registry)
|
||||
const pezkuwiNetworks = [
|
||||
{
|
||||
info: 'pezkuwi',
|
||||
text: 'Pezkuwi Relay Chain',
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
info: 'dicle',
|
||||
text: 'Dicle Relay Chain',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
info: 'zagros',
|
||||
text: 'Zagros Testnet',
|
||||
value: 42
|
||||
},
|
||||
{
|
||||
info: 'pezkuwichain',
|
||||
text: 'PezkuwiChain Development',
|
||||
value: 42
|
||||
}
|
||||
];
|
||||
|
||||
const networks = [
|
||||
...pezkuwiNetworks,
|
||||
...selectableNetworks
|
||||
.map(({ displayName, network, prefix }) => ({
|
||||
info: network,
|
||||
text: displayName,
|
||||
value: prefix
|
||||
}))
|
||||
// Filter out polkadot/kusama since we're replacing them with pezkuwi/dicle
|
||||
.filter(({ info }) => !['polkadot', 'kusama'].includes(info || ''))
|
||||
]
|
||||
.sort((a, b) =>
|
||||
[0, 2, 42].includes(a.value) || [0, 2, 42].includes(b.value)
|
||||
? 0
|
||||
|
||||
Reference in New Issue
Block a user