We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da58476 commit 7e56ff0Copy full SHA for 7e56ff0
packages/amino/src/secp256k1hdwallet.ts
@@ -198,6 +198,8 @@ export class Secp256k1HdWallet implements OfflineAminoSigner {
198
): Promise<Secp256k1HdWallet> {
199
const root = JSON.parse(serialization);
200
if (!isNonNullObject(root)) throw new Error("Root document is not an object.");
201
+ // This cast is safe because `root` comes from a valid JSON document and `root` is a non-null object.
202
+ // I.e. it can only be a JSON object, not an aribitrary JS object.
203
const untypedRoot: Record<string, any> = root;
204
switch (untypedRoot.type) {
205
case serializationTypeV1: {
0 commit comments