File tree Expand file tree Collapse file tree
src/boilerplate/orchestration/javascript/raw Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -371,15 +371,14 @@ export const preimageBoilerPlate = (node: any) => {
371371 default :
372372 // TODO - this is the case where the owner is an admin (state var)
373373 // we have to let the user submit the key and check it in the contract
374- if ( ! stateNode . ownerIsSecret && ! stateNode . ownerIsParam ) {
374+ if ( stateNode . isSharedSecret ) {
375+ newOwnerStatment = `_${ privateStateName } _newOwnerPublicKey === 0 ? sharedPublicKey : ${ privateStateName } _newOwnerPublicKey;` ;
376+ } else if ( ! stateNode . ownerIsSecret && ! stateNode . ownerIsParam ) {
375377 newOwnerStatment = `_${ privateStateName } _newOwnerPublicKey === 0 ? generalise(await instance.methods.zkpPublicKeys(await instance.methods.${ newOwner } ().call()).call()) : ${ privateStateName } _newOwnerPublicKey;` ;
376378 } else if ( stateNode . ownerIsParam && newOwner ) {
377379 newOwnerStatment = `_${ privateStateName } _newOwnerPublicKey === 0 ? ${ newOwner } : ${ privateStateName } _newOwnerPublicKey;` ;
378380 } else {
379381 // is secret - we just use the users to avoid revealing the secret owner
380- if ( stateNode . isSharedSecret )
381- newOwnerStatment = `_${ privateStateName } _newOwnerPublicKey === 0 ? sharedPublicKey : ${ privateStateName } _newOwnerPublicKey;` ;
382- else
383382 newOwnerStatment = `_${ privateStateName } _newOwnerPublicKey === 0 ? publicKey : ${ privateStateName } _newOwnerPublicKey;`
384383
385384 // BELOW reveals the secret owner as we check the public key in the contract
You can’t perform that action at this time.
0 commit comments