Skip to content

Commit

Permalink
Fix attachment of capabilityAction during invocation.
Browse files Browse the repository at this point in the history
  • Loading branch information
msporny committed Jun 29, 2021
1 parent b91e73c commit fbd9fc8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/VeresOneDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ class VeresOneDriver {
// wrap DID Document in a web ledger operation
const operation = await this.client.wrap(
{didDocument, operationType: 'create'});
await this.send(operation,
{accelerator, didDocument, keyPairs, authDoc, ...sendOptions});
await this.send(
operation, {accelerator, didDocument, keyPairs, authDoc, ...sendOptions});

return didDocument;
}
Expand Down
4 changes: 3 additions & 1 deletion lib/attachProof.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ async function attachProofs(operation, {

const controller = capabilityInvocationKeyPair.id || signer.id;
// attach capability invocation proof
const capabilityAction = (operation.type === 'CreateWebLedgerRecord') ?
'create' : 'write';
operation = await attachInvocationProof(operation, {
capability: did,
capabilityAction: operation.type,
capabilityAction,
controller,
key: capabilityInvocationKeyPair,
signer
Expand Down

0 comments on commit fbd9fc8

Please sign in to comment.