Skip to content

Commit

Permalink
Update release pipeline, update TS interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytrotkk committed Sep 26, 2023
1 parent 4b601c2 commit 3341d62
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
- name: Yarn build
run: |
yarn run build
yarn build:lib
- name: Publish on npm
run: |
if [[ "$BRANCH" == "stable" ]]; then
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"lint": "eslint --ext .js,.jsx,.ts,.tsx --fix",
"prettier": "prettier --write \"src/**/*.{ts,tsx,js,mdx}\"",
"test": "vitest",
"test:cov": "vitest run --coverage"
"test:cov": "vitest run --coverage",
"version": "node -e \"console.log(require('./package.json').version);\""
},
"devDependencies": {
"@storybook/addon-essentials": "7.4.0",
Expand Down
14 changes: 13 additions & 1 deletion src/core/interfaces/ChainsMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,32 @@
* @copyright SKALE Labs 2022-Present
*/

import { SkaleNetwork } from './Config'

export interface ChainMetadata {
alias?: string
minSfuelWei?: string
faucetUrl?: string
category: string
background: string
gradientBackground?: string
description?: string
url?: string
apps?: {
[appName: string]: {
alias: string
background: string
url: string
gradientBackground?: string
description?: string
url?: string
}
}
}

export interface ChainsMetadataMap {
[chainName: string]: ChainMetadata
}

export type NetworksMetadataMap = {
[key in SkaleNetwork]: ChainsMetadataMap
}
6 changes: 3 additions & 3 deletions src/core/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/

import { TokenData } from './dataclasses'
import { SkaleNetwork } from './interfaces'
import { SkaleNetwork, NetworksMetadataMap } from './interfaces'
import { MAINNET_CHAIN_NAME } from './constants'

import mainnetMeta from '../meta/mainnet/chains.json'
Expand All @@ -37,14 +37,14 @@ import * as REGRESSION_CHAIN_ICONS from '../meta/regression/icons'

import * as icons from '../icons'

const CHAIN_ICONS = {
const CHAIN_ICONS: { [network in SkaleNetwork]: any } = {
mainnet: MAINNET_CHAIN_ICONS,
staging: STAGING_CHAIN_ICONS,
legacy: LEGACY_CHAIN_ICONS,
regression: REGRESSION_CHAIN_ICONS
}

export const CHAINS_META = {
export const CHAINS_META: NetworksMetadataMap = {
mainnet: mainnetMeta,
staging: stagingMeta,
legacy: legacyMeta,
Expand Down

0 comments on commit 3341d62

Please sign in to comment.