Revert "perf: ⚡ delete transformedOptions key -> assign undefined with key literal"
This reverts commit 652ecd2d16
.
This commit is contained in:
parent
01eef838f4
commit
2442a7535d
@ -68,13 +68,13 @@ export class LdSignature {
|
|||||||
...options,
|
...options,
|
||||||
"@context": "https://w3id.org/identity/v1",
|
"@context": "https://w3id.org/identity/v1",
|
||||||
};
|
};
|
||||||
transformedOptions.type = undefined;
|
delete transformedOptions["type"];
|
||||||
transformedOptions.id = undefined;
|
delete transformedOptions["id"];
|
||||||
transformedOptions.signatureValue = undefined;
|
delete transformedOptions["signatureValue"];
|
||||||
const canonizedOptions = await this.normalize(transformedOptions);
|
const canonizedOptions = await this.normalize(transformedOptions);
|
||||||
const optionsHash = this.sha256(canonizedOptions);
|
const optionsHash = this.sha256(canonizedOptions);
|
||||||
const transformedData = { ...data };
|
const transformedData = { ...data };
|
||||||
transformedData.signature = undefined;
|
delete transformedData["signature"];
|
||||||
const cannonidedData = await this.normalize(transformedData);
|
const cannonidedData = await this.normalize(transformedData);
|
||||||
if (this.debug) console.debug(`cannonidedData: ${cannonidedData}`);
|
if (this.debug) console.debug(`cannonidedData: ${cannonidedData}`);
|
||||||
const documentHash = this.sha256(cannonidedData);
|
const documentHash = this.sha256(cannonidedData);
|
||||||
|
Loading…
Reference in New Issue
Block a user