Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Cannot vote with custom account permissions #63

Open
LiorHalfon opened this issue Jul 8, 2018 · 1 comment
Open

Cannot vote with custom account permissions #63

LiorHalfon opened this issue Jul 8, 2018 · 1 comment

Comments

@LiorHalfon
Copy link

LiorHalfon commented Jul 8, 2018

Hi,
I've created a voting authority by doing:
cleos set account permission ACCOUNT_NAME voting '{"threshold":1,"keys":[{"key":"PUBLIC_KEY","weight":1}]}' "active" -p ACCOUNT_NAME@active
And linked it to voteproducer action by doing:
cleos set action permission ACCOUNT_NAME eosio.system voteproducer voting -p ACCOUNT_NAME@active

The reason I did this is to enable me to use the voting portal without sharing my private key with Scatter.

Now after I've set up Scatter identity ACCOUNT_NAME@voting, and paired with the voting portal, I'm getting this error:

Voting failed: Missing required accounts, repull the identity

When I change my voting identity to ACCOUNT_NAME@active in Scatter, The portal takes me to the Scatter confirmation page but then fails to authenticate the transaction. (As it should, because I don't have the ACCOUNT_NAME@active private key in Scatter)
@nsjames

@nsjames
Copy link
Contributor

nsjames commented Jul 10, 2018

Looks like this is an issue ( or rather a lack of functionality ) with eosjs.

This is the code that votes for producers, which just takes an account name and infers the permissions via eosjs.
https://github.com/EOSPortal/eosportal-front/blob/master/src/utils/eos.util.ts#L112

That code could be extended to provide support for custom authorities by passing it along with the account to the method and building the authorization array manually.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants