mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-06-09 20:11:04 +00:00
+1
-1
@@ -1,4 +1,4 @@
|
||||
const base = require('@polkadot/dev-react/config/eslint');
|
||||
const base = require('@polkadot/dev/config/eslint');
|
||||
|
||||
module.exports = {
|
||||
...base,
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const base = require('@polkadot/dev-react/config/babel');
|
||||
const base = require('@polkadot/dev/config/babel');
|
||||
|
||||
module.exports = Object.keys(base).reduce((config, key) => {
|
||||
config[key] = base[key];
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const config = require('@polkadot/dev-react/config/jest');
|
||||
const config = require('@polkadot/dev/config/jest');
|
||||
|
||||
module.exports = Object.assign({}, config, {
|
||||
moduleNameMapper: {
|
||||
|
||||
+5
-5
@@ -15,7 +15,7 @@
|
||||
"scripts": {
|
||||
"build": "polkadot-dev-build-ts",
|
||||
"docs": "polkadot-dev-build-docs",
|
||||
"lint": "eslint --ext .js,.jsx,.ts,.tsx . && tsc --noEmit --pretty",
|
||||
"lint": "polkadot-dev-run-lint",
|
||||
"clean": "polkadot-dev-clean-build",
|
||||
"demo:identicon:react": "yarn build:ts && webpack-serve --config packages/react-identicon/webpack.config.js --content packages/react-identicon --port 8080",
|
||||
"demo:identicon:vue": "yarn build:ts && webpack-serve --config packages/vue-identicon/webpack.config.js --content packages/vue-identicon --port 8080",
|
||||
@@ -25,14 +25,14 @@
|
||||
"example:react": "yarn build:ts && cd packages/example-react && webpack --config webpack.config.js",
|
||||
"example:vue": "yarn build:ts && cd packages/example-vue && webpack --config webpack.config.js",
|
||||
"postinstall": "polkadot-dev-yarn-only",
|
||||
"test": "jest --coverage --runInBand",
|
||||
"test:one": "jest"
|
||||
"test": "polkadot-dev-run-test --coverage --runInBand",
|
||||
"test:one": "polkadot-dev-run-test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.8.4",
|
||||
"@babel/runtime": "^7.8.4",
|
||||
"@polkadot/dev-react": "^0.34.1",
|
||||
"@polkadot/ts": "^0.2.2",
|
||||
"@polkadot/dev": "^0.40.3",
|
||||
"@polkadot/ts": "^0.2.3",
|
||||
"babel-plugin-transform-vue-template": "^0.4.2",
|
||||
"empty": "^0.10.1",
|
||||
"react": "^16.12.0",
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.8.4",
|
||||
"@babel/runtime": "^7.8.4",
|
||||
"@polkadot/keyring": "^2.3.0-beta.1",
|
||||
"@polkadot/util": "^2.3.0-beta.1",
|
||||
"@polkadot/util-crypto": "^2.3.0-beta.1",
|
||||
"@react-native-community/cli-platform-ios": "^3.0.0",
|
||||
"@types/react-test-renderer": "16.9.2",
|
||||
"babel-jest": "^25.1.0",
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
"@polkadot/ui-settings": "^0.50.0-beta.1",
|
||||
"@polkadot/ui-shared": "^0.50.0-beta.1",
|
||||
"@types/react-copy-to-clipboard": "^4.3.0",
|
||||
"@types/react-dom": "^16.9.5",
|
||||
"@types/styled-components": "^4.4.3",
|
||||
"color": "^3.1.2",
|
||||
"jdenticon": "2.2.0",
|
||||
"react-copy-to-clipboard": "^5.0.2",
|
||||
@@ -27,8 +29,9 @@
|
||||
"react-is": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^2.3.0-beta.0",
|
||||
"@polkadot/util-crypto": "^2.3.0-beta.0",
|
||||
"@polkadot/keyring": "^2.3.0-beta.1",
|
||||
"@polkadot/util": "^2.3.0-beta.1",
|
||||
"@polkadot/util-crypto": "^2.3.0-beta.1",
|
||||
"xmlserializer": "^0.6.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.8.4",
|
||||
"@types/react-qr-reader": "^2.1.1",
|
||||
"@types/styled-components": "^4.4.3",
|
||||
"qrcode-generator": "^1.4.4",
|
||||
"react-qr-reader": "^2.2.1"
|
||||
},
|
||||
|
||||
@@ -11,11 +11,15 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.8.4",
|
||||
"@polkadot/ui-shared": "^0.50.0-beta.1",
|
||||
"@types/react-native": "^0.61.12",
|
||||
"react-native-svg": "^11.0.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@polkadot/util-crypto": "*",
|
||||
"react": "*",
|
||||
"react-native": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util-crypto": "^2.3.0-beta.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
"store": "^2.0.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^2.3.0-beta.0",
|
||||
"@polkadot/types": "^1.2.0-beta.10",
|
||||
"@polkadot/util": "^2.3.0-beta.0"
|
||||
"@polkadot/keyring": "^2.3.0-beta.1",
|
||||
"@polkadot/types": "^1.2.0-beta.12",
|
||||
"@polkadot/util": "^2.3.0-beta.1"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@ledgerhq/hw-transport-node-hid": "^5.7.0"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"store": "^2.0.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util": "^2.3.0-beta.0"
|
||||
"@polkadot/util": "^2.3.0-beta.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@polkadot/util": "*"
|
||||
|
||||
@@ -4,132 +4,10 @@
|
||||
|
||||
import { Option } from '../types';
|
||||
|
||||
import { isPolkadot } from './type';
|
||||
|
||||
type ChainName = 'alexander' | 'edgeware' | 'edgewareTest' | 'flamingFir' | 'kusama' | 'kulupu' | 'westend';
|
||||
|
||||
interface ChainData {
|
||||
chainDisplay: string;
|
||||
logo: 'alexander' | 'edgeware' | 'kusama' | 'polkadot' | 'substrate';
|
||||
type: string;
|
||||
}
|
||||
|
||||
type ProviderName = 'commonwealth' | 'parity' | 'unfrastructure' | 'w3f' | 'kulupu';
|
||||
|
||||
interface PoviderData {
|
||||
providerDisplay: string;
|
||||
nodes: Partial<Record<ChainName, string>>;
|
||||
}
|
||||
|
||||
// we use this to give an ordering to the chains available
|
||||
const ORDER_CHAINS: ChainName[] = ['kusama', 'edgeware', 'westend', 'edgewareTest', 'flamingFir', 'kulupu'];
|
||||
|
||||
// we use this to order the providers inside the chains
|
||||
const ORDER_PROVIDERS: ProviderName[] = ['parity', 'w3f', 'unfrastructure', 'commonwealth', 'kulupu'];
|
||||
|
||||
// some suplementary info on a per-chain basis
|
||||
const CHAIN_INFO: Record<ChainName, ChainData> = {
|
||||
alexander: {
|
||||
chainDisplay: 'Alexander',
|
||||
logo: 'alexander',
|
||||
type: 'Polkadot Testnet'
|
||||
},
|
||||
edgeware: {
|
||||
chainDisplay: 'Edgeware',
|
||||
logo: 'edgeware',
|
||||
type: 'Edgeware Mainnet'
|
||||
},
|
||||
edgewareTest: {
|
||||
chainDisplay: 'Berlin',
|
||||
logo: 'edgeware',
|
||||
type: 'Edgeware Testnet'
|
||||
},
|
||||
flamingFir: {
|
||||
chainDisplay: 'Flaming Fir',
|
||||
logo: 'substrate',
|
||||
type: 'Substrate Testnet'
|
||||
},
|
||||
kusama: {
|
||||
chainDisplay: 'Kusama',
|
||||
logo: 'kusama',
|
||||
type: 'Polkadot Canary'
|
||||
},
|
||||
kulupu: {
|
||||
chainDisplay: 'Kulupu',
|
||||
logo: 'substrate',
|
||||
type: 'Kulupu Mainnet'
|
||||
},
|
||||
westend: {
|
||||
chainDisplay: 'Westend',
|
||||
logo: 'alexander',
|
||||
type: 'Polkadot Testnet'
|
||||
}
|
||||
};
|
||||
|
||||
// the actual providers with all the nodes they provide
|
||||
const PROVIDERS: Record<ProviderName, PoviderData> = {
|
||||
commonwealth: {
|
||||
providerDisplay: 'Commonwealth Labs',
|
||||
nodes: {
|
||||
edgeware: 'wss://mainnet1.edgewa.re',
|
||||
edgewareTest: 'wss://berlin1.edgewa.re'
|
||||
}
|
||||
},
|
||||
parity: {
|
||||
providerDisplay: 'Parity',
|
||||
nodes: {
|
||||
// alexander: 'wss://poc3-rpc.polkadot.io/',
|
||||
flamingFir: 'wss://substrate-rpc.parity.io/',
|
||||
kusama: 'wss://kusama-rpc.polkadot.io/',
|
||||
westend: 'wss://westend-rpc.polkadot.io'
|
||||
}
|
||||
},
|
||||
unfrastructure: {
|
||||
providerDisplay: 'Centrality UNfrastructure',
|
||||
nodes: {
|
||||
// alexander: 'wss://alex.unfrastructure.io/public/ws'
|
||||
}
|
||||
},
|
||||
w3f: {
|
||||
providerDisplay: 'Web3 Foundation',
|
||||
nodes: {
|
||||
kusama: 'wss://cc3-5.kusama.network/'
|
||||
}
|
||||
},
|
||||
kulupu: {
|
||||
providerDisplay: 'Kulupu',
|
||||
nodes: {
|
||||
kulupu: 'wss://rpc.kulupu.network/ws'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const ENDPOINT_DEFAULT = isPolkadot
|
||||
? PROVIDERS.parity.nodes.kusama
|
||||
: PROVIDERS.parity.nodes.flamingFir;
|
||||
|
||||
export const ENDPOINTS: Option[] = ORDER_CHAINS.reduce((endpoints: Option[], chainName): Option[] => {
|
||||
const { chainDisplay, logo, type } = CHAIN_INFO[chainName];
|
||||
|
||||
return ORDER_PROVIDERS.reduce((endpoints: Option[], providerName): Option[] => {
|
||||
const { providerDisplay, nodes } = PROVIDERS[providerName];
|
||||
const wssUrl = nodes[chainName];
|
||||
|
||||
if (wssUrl) {
|
||||
endpoints.push({
|
||||
info: logo,
|
||||
text: `${chainDisplay} (${type}, hosted by ${providerDisplay})`,
|
||||
value: wssUrl
|
||||
});
|
||||
}
|
||||
|
||||
return endpoints;
|
||||
}, endpoints);
|
||||
}, []);
|
||||
|
||||
// add a local node right at the end
|
||||
ENDPOINTS.push({
|
||||
export const ENDPOINTS: Option[] = [{
|
||||
info: 'local',
|
||||
text: 'Local Node (Own, 127.0.0.1:9944)',
|
||||
value: 'ws://127.0.0.1:9944/'
|
||||
});
|
||||
}];
|
||||
|
||||
export const ENDPOINT_DEFAULT = ENDPOINTS[0];
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
"@polkadot/util-crypto": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util-crypto": "^2.3.0-beta.0"
|
||||
"@polkadot/util-crypto": "^2.3.0-beta.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,5 +16,9 @@
|
||||
"peerDependencies": {
|
||||
"@polkadot/util-crypto": "*",
|
||||
"vue": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util-crypto": "^2.3.0-beta.1",
|
||||
"vue": "^2.6.11"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user