poanetwork / poa-popa

DApp for proof of physical address (PoPA) attestation for validators of POA Network
https://popa.poa.network
GNU General Public License v3.0
24 stars 18 forks source link

Addresses considered in functions that not necessarily should #78

Closed Janther closed 6 years ago

Janther commented 6 years ago

The function user_last_used_name returns the last name submited regardless of it being confirmed.

The function user_addresses_count also considers unconfirmed addresses.

Only consider confirmed addresses.

phahulin commented 6 years ago

These functions are not currently used by the DApp, they can be regarded as helper functions for the future if we'll support a more advanced UI (list of confirmed addresses, etc).

We can either remove them for now from the contract or create two variants of each function:

user_last_used_name -> user_last_confirmed_name + user_last_submitted_name
user_addresses_count -> user_confirmed_addresses_count + user_total_addresses_count