Browse Source

storage-node-v2: Fix broken types.

Shamil Gadelshin 3 years ago
parent
commit
bd3ec9bd4e
3 changed files with 7 additions and 4 deletions
  1. 5 2
      storage-node-v2/src/services/helpers/bagTypes.ts
  2. 0 0
      types/augment-codec/all.ts
  3. 2 2
      yarn.lock

+ 5 - 2
storage-node-v2/src/services/helpers/bagTypes.ts

@@ -2,7 +2,7 @@ import { BagId, DynamicBagType, DynamicBagTypeKey, Static, Dynamic } from '@joys
 import { WorkingGroup } from '@joystream/types/common'
 import { registry } from '@joystream/types'
 import { createType } from '@polkadot/types'
-import { InterfaceTypes } from '@polkadot/types/types'
+import { DetectCodec, Codec } from '@polkadot/types/types'
 import ExitCodes from '../../command-base/ExitCodes'
 import { CLIError } from '@oclif/errors'
 
@@ -160,6 +160,9 @@ class BagIdParser {
 /**
  * Creates Joystream type using type registry.
  */
-function createJoystreamType<T extends keyof InterfaceTypes>(type: T, value: unknown): InterfaceTypes[T] {
+function createJoystreamType<T extends Codec = Codec, K extends string = string>(
+  type: K,
+  value: unknown
+): DetectCodec<T, K> {
   return createType(registry, type, value)
 }

File diff suppressed because it is too large
+ 0 - 0
types/augment-codec/all.ts


+ 2 - 2
yarn.lock

@@ -8984,9 +8984,9 @@ bintrees@1.0.1:
   resolved "https://registry.yarnpkg.com/bintrees/-/bintrees-1.0.1.tgz#0e655c9b9c2435eaab68bf4027226d2b55a34524"
   integrity "sha1-DmVcm5wkNeqraL9AJyJtK1WjRSQ= sha512-tbaUB1QpTIj4cKY8c1rvNAvEQXA+ekzHmbe4jzNfW3QWsF9GnnP/BRWyl6/qqS53heoYJ93naaFcm/jooONH8g=="
 
-"bip32-ed25519@git+https://github.com/Zondax/bip32-ed25519.git":
+"bip32-ed25519@https://github.com/Zondax/bip32-ed25519":
   version "0.0.4"
-  resolved "git+https://github.com/Zondax/bip32-ed25519.git#0949df01b5c93885339bc28116690292088f6134"
+  resolved "https://github.com/Zondax/bip32-ed25519#0949df01b5c93885339bc28116690292088f6134"
   dependencies:
     bn.js "^5.1.1"
     elliptic "^6.4.1"

Some files were not shown because too many files changed in this diff