voteflux / digipol

An app to allow Australian Voters to vote on current issues and bills in the parliament.
https://digipol.app
GNU General Public License v3.0
60 stars 9 forks source link

Voting bug fix #185

Closed KipCrossing closed 3 years ago

KipCrossing commented 3 years ago

Problem: Voting bug

Solution: remove eth type in hive bill vote, fix the voting issue

KipCrossing commented 3 years ago

Screenshot from 2021-01-04 18-15-38

I get this with a fresh install of the app

KipCrossing commented 3 years ago

https://github.com/voteflux/voting-alpha#curl-based-can-be-run-from-cli This need to be done

EDIT: it has been done in auth_servide.dart

KipCrossing commented 3 years ago

I just checked that we are signing up ok and it seems to work fine. When I:

print(response.body);

I get:

I/flutter (10722): {"result": "success", "txids": "0x152c331325017154d025099bc2469c26cc1a6c9df0bf6562b3984ba5d6b8adef,0xacdfaa2bde9c4fefcd4c662ee6904b07f23ed9cfcd7e27e3a940bd61d060fcaf"}

This means we are not passing the correct eth address through when making a vote.

KipCrossing commented 3 years ago

https://github.com/voteflux/voting-alpha/blob/7e2ac9fdfdec41a70d1b3a57c0dc2b3dbb466d1a/stack/app/members/api/handlers.py#L187

This is where the eth is given to the user.

Another possibility is that the my_addr has ran out of eth and therefore no more eth is given to new users. Also make sense why you didnt get the error @oscarmanderj

magnetism2000 commented 3 years ago

Can you add more eth? I though we were on the testnet?

BenBallingall commented 3 years ago

Uhh, might need faucet address? Probs a @XertroV or Adrian thing tbh. Mebbe @bazmatic

XertroV commented 3 years ago

remove eth type in hive bill vote, fix the voting issue

i'm not sure that will fix the issue.

steps to debug:

i think removing typing info from the client won't affect the balance of the addr. (the thing that the OP suggests)

bazmatic commented 3 years ago

remove eth type in hive bill vote, fix the voting issue

i'm not sure that will fix the issue.

steps to debug:

  • the txid you get back from the API call; which addr makes that? I/flutter (10722): {"result": "success", "txids": "0x152c331325017154d025099bc2469c26cc1a6c9df0bf6562b3984ba5d6b8adef,0xacdfaa2bde9c4fefcd4c662ee6904b07f23ed9cfcd7e27e3a940bd61d060fcaf"
  • which addr are you trying to vote with?
  • what's the balance of that address?

i think removing typing info from the client won't affect the balance of the addr. (the thing that the OP suggests)

The ethereum address being used was invalid due to a type mismatch, hence the transaction failed. Now the address is being passed through correctly, so this has fixed the issue.

KipCrossing commented 3 years ago

Thanks to everyone for getting involved in this!

Screenshot from 2021-01-08 11-24-46

I just looked into it again and got success. Perhaps something weird happened with the previous attempt; idk.

@oscarmanderj feel free to merge this