Skip to content

Commit

Permalink
feat: Fix generating uuid requiring admin account (#1666)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodion-lim-partior committed Aug 21, 2023
1 parent c46b44c commit 57fa403
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions extension/api.go
Expand Up @@ -158,11 +158,6 @@ func (api *PrivateExtensionAPI) GenerateExtensionApprovalUuid(ctx context.Contex
txa.PrivateFor = append(txa.PrivateFor, participants...)
}

txArgs, err := api.privacyService.GenerateTransactOptions(txa)
if err != nil {
return "", err
}

psiManagementContractClient := api.privacyService.managementContract(psi)
defer psiManagementContractClient.Close()
voterList, err := psiManagementContractClient.GetAllVoters(addressToVoteOn)
Expand All @@ -176,7 +171,7 @@ func (api *PrivateExtensionAPI) GenerateExtensionApprovalUuid(ctx context.Contex
if api.checkAlreadyVoted(addressToVoteOn, externalSignerAddress, psi) {
return "", errors.New("already voted")
}
uuid, err := generateUuid(addressToVoteOn, txArgs.PrivateFrom, txArgs.PrivateFor, api.privacyService.ptm)
uuid, err := generateUuid(addressToVoteOn, txa.PrivateFrom, txa.PrivateFor, api.privacyService.ptm)
if err != nil {
return "", err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/web3ext/web3ext.go
Expand Up @@ -1254,7 +1254,7 @@ web3._extend({
new web3._extend.Method({
name: 'generateExtensionApprovalUuid',
call: 'quorumExtension_generateExtensionApprovalUuid',
params: 2,
params: 3,
inputFormatter: [web3._extend.formatters.inputAddressFormatter, web3._extend.formatters.inputAddressFormatter, web3._extend.formatters.inputTransactionFormatter]
}),
new web3._extend.Method({
Expand Down

0 comments on commit 57fa403

Please sign in to comment.