Skip to content

Commit

Permalink
Merge pull request #11 from cheqd/deps-types
Browse files Browse the repository at this point in the history
fix(types): Fixed type mismatch on compilation
  • Loading branch information
Eengineer1 authored Aug 4, 2022
2 parents 3053621 + c0cfbd5 commit 139818f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
11 changes: 8 additions & 3 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@semantic-release/npm": "^9.0.1",
"@semantic-release/release-notes-generator": "^10.0.3",
"@types/jest": "^28.1.6",
"@types/long": "^4.0.2",
"@types/node": "^18.6.2",
"@types/uuid": "^8.3.4",
"conventional-changelog-conventionalcommits": "^5.0.0",
Expand Down
4 changes: 3 additions & 1 deletion src/signer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CheqdExtensions } from './modules/_'
import { EncodeObject, isOfflineDirectSigner, OfflineSigner, encodePubkey, TxBodyEncodeObject, makeSignDoc, Registry } from "@cosmjs/proto-signing"
import { EncodeObject, isOfflineDirectSigner, OfflineSigner, encodePubkey, TxBodyEncodeObject, makeSignDoc } from "@cosmjs/proto-signing"
import { DeliverTxResponse, GasPrice, HttpEndpoint, QueryClient, SigningStargateClient, SigningStargateClientOptions, calculateFee, SignerData } from "@cosmjs/stargate"
import { Tendermint34Client } from "@cosmjs/tendermint-rpc"
import { createDefaultCheqdRegistry } from "./registry"
Expand Down Expand Up @@ -52,6 +52,8 @@ export function makeDidAuthInfoBytes(
payer: feePayer
}
}
//* There is a `Long` type incompatibility in the protobuf library that causes the following line to throw an error. No actual type mismatch is ever encountered.
// @ts-ignore
return AuthInfo.encode(AuthInfo.fromPartial(authInfo)).finish()
}

Expand Down
1 change: 0 additions & 1 deletion tests/modules/did.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"
import { DeliverTxResponse } from "@cosmjs/stargate"
import { fromString, toString } from 'uint8arrays'
import { DIDModule } from "../../src"
import { AbstractCheqdSDKModule } from "../../src/modules/_"
import { createDefaultCheqdRegistry } from "../../src/registry"
import { CheqdSigningStargateClient } from "../../src/signer"
import { DidStdFee, ISignInputs, MethodSpecificIdAlgo, VerificationMethods } from "../../src/types"
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"types": [
"@types/node",
"@types/jest",
"@types/long"
], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
Expand Down

0 comments on commit 139818f

Please sign in to comment.