There were only two fromJsonTree methods that had JSON in uppercase - I have made them consistent. This also fixes an issue parsing the events as the parser was expecting a lowercase method to be called.
Further, there was a missing return when fetching the IPFS DID document JSON - this has been added.
I have verified with the following:
it("resolves an IPFS-based did document", async () => {
const resolver = new Resolver({
...new HederaDidResolver().build(),
});
let result: any;
await delayUntil(async () => {
result = await resolver.resolve(
"did:hedera:testnet:7ZPRxrKEdJLvVs7EnVPZ75ZEjFUviUFG8daHKLR9FgxF_0.0.499750"
);
return result?.didDocument?.assertionMethod?.length >= 1;
}, WAIT_BEFORE_RESOLVE_DID_FOR);
console.log(result);
});
There were only two
fromJsonTree
methods that had JSON in uppercase - I have made them consistent. This also fixes an issue parsing the events as the parser was expecting a lowercase method to be called.Further, there was a missing return when fetching the IPFS DID document JSON - this has been added.
I have verified with the following: