Skip to content

Commit

Permalink
Merge pull request #55 from BoostryJP/feature/#51
Browse files Browse the repository at this point in the history
Fix generating uuid requiring admin account and json rpc number of parameters
  • Loading branch information
YoshihitoAso authored Sep 12, 2023
2 parents 991bf44 + 35f641f commit 93eee0c
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 93eee0c

Please sign in to comment.