forked from polkadot-js/apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust light relay/para mappings (polkadot-js#8059)
* Adjust light relay/para mappings * Adjust resolveJsonModule
- Loading branch information
Showing
7 changed files
with
61 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2017-2022 @polkadot/react-api authors & contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { ScProvider } from '@polkadot/api'; | ||
|
||
import { specs as kusama } from './kusama'; | ||
|
||
export const lightSpecs: Record<string, Record<string, string>> = | ||
Object | ||
.entries<Record<string, unknown>>({ kusama }) | ||
.reduce((relays: Record<string, Record<string, string>>, [k, s]) => { | ||
relays[k] = Object | ||
.entries<unknown>(s) | ||
.reduce((paras: Record<string, string>, [k, v]) => { | ||
paras[k] = JSON.stringify(v); | ||
|
||
return paras; | ||
}, {}); | ||
|
||
return relays; | ||
}, {}); | ||
|
||
export const relaySpecs: Record<string, string> = { | ||
kusama: ScProvider.WellKnownChain.ksmcc3, | ||
polkadot: ScProvider.WellKnownChain.polkadot, | ||
rococo: ScProvider.WellKnownChain.rococo_v2_2, | ||
westend: ScProvider.WellKnownChain.westend2 | ||
}; |
File renamed without changes.
12 changes: 5 additions & 7 deletions
12
...react-api/src/light-client-specs/index.ts → ...react-api/src/lightClient/kusama/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
// Copyright 2017-2022 @polkadot/react-api authors & contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
/* eslint sort-keys: ["error", "asc", { caseSensitive: false }] */ | ||
|
||
import gmSpec from './gm.json'; | ||
import tinkernetSpec from './tinkernet.json'; | ||
import gm from './gm.json' assert { type: 'json' }; | ||
import tinkernet from './tinkernet.json' assert { type: 'json' }; | ||
|
||
// Add your imported spec here in alphabetical order. | ||
// The key here reflects the URL of the light client endpoint. | ||
// e.g. light://substrate-connect/kusama/gm | ||
export const lightSpecs: Record<string, unknown> = { | ||
gm: gmSpec, | ||
tinkernet: tinkernetSpec | ||
export const specs: Record<string, unknown> = { | ||
gm, | ||
tinkernet | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters