Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
devdanco committed Nov 21, 2023
1 parent 1fb4dc4 commit 59d7a8c
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 48 deletions.
22 changes: 1 addition & 21 deletions .github/workflows/pre-release-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,27 +94,7 @@ jobs:
- name: Sleep for 1 minutes
run: sleep 60s

- run: npm i

- name: Extract the latest version of type definitions
if: ${{ github.event.inputs.branch == '' }}
run: |
version=$(npm show @mangata-finance/type-definitions version)
echo "NPM package version of mangata type definitions is $version"
echo "MANGATA_TYPE_DEFINITIONS=$version" >> $GITHUB_ENV
- name: Extract the tag version of type definitions based on branch
if: ${{ github.event.inputs.branch != '' }}
env:
INPUTS_BRANCH: ${{ github.event.inputs.branch }}
run: |
version=$(npm show @mangata-finance/type-definitions@${INPUTS_BRANCH//\//-} version || npm show @mangata-finance/type-definitions version)
echo "NPM package version of mangata type definitions is $version"
echo "MANGATA_TYPE_DEFINITIONS=$version" >> $GITHUB_ENV
- name: Install always latest type definitions
working-directory: packages/types
run: npm i @mangata-finance/type-definitions@${{ env.MANGATA_TYPE_DEFINITIONS }}
- run: npm ci

- run: npx nx run @mangata-finance/types:generate-metadata

Expand Down
18 changes: 0 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
],
"license": "GPL-3.0",
"peerDependencies": {
"@polkadot/api": "^10.9.1"
},
"devDependencies": {
"@mangata-finance/type-definitions": "2.0.0"
"@polkadot/api": "10.9.1"
},
"type": "module",
"module": "./src/index.js",
Expand Down
7 changes: 6 additions & 1 deletion packages/types/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
"outputPath": "dist/packages/types",
"main": "packages/types/src/index.ts",
"tsConfig": "packages/types/tsconfig.lib.json",
"assets": ["packages/types/*.md"]
"assets": ["packages/types/*.md"],
"transformers": [
{
"name": "typescript-transform-paths/nx-transformer"
}
]
}
},
"build-types": {
Expand Down
27 changes: 23 additions & 4 deletions packages/types/src/interfaces/definitions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
import { mTypes } from "@mangata-finance/type-definitions";

export default {
types: mTypes
};
types: {
ShufflingSeed: {
seed: "H256",
proof: "H512"
},
Header: {
parentHash: "Hash",
number: "Compact<BlockNumber>",
stateRoot: "Hash",
extrinsicsRoot: "Hash",
digest: "Digest",
seed: "ShufflingSeed",
count: "BlockNumber"
},
RpcAssetMetadata: {
tokenId: "TokenId",
decimals: "u32",
name: "Vec<u8>",
symbol: "Vec<u8>"
},
TokenId: "u32",
}
}

0 comments on commit 59d7a8c

Please sign in to comment.