Closed fvictorio closed 6 years ago
I didn't add tests for this, because testing events with ganache is very unreliable (sometimes they work, sometimes they don't). If someone knows how to do it properly, please let me know.
Totals | |
---|---|
Change from base Build 405: | 0.09% |
Covered Lines: | 948 |
Relevant Lines: | 1173 |
My suggestions:
Log
prefix for names of events, e.g. AddressConfirmed
userAddressByKeccakIdentifier()
analogous to other userAddressBy...
functions and make AddressRegistered
, AddressUnregistered
have the same signature as AddressConfirmed(address wallet, bytes32 keccakIdentifier)
@phahulin I updated the event for address confirmation. I didn't have to add a new method, since I had the index of the physical address for that wallet.
It bothers me that the LogAddressRegistered
event has string name
, but the other two don't. And there doesn't seem to be an easy way to obtain it. I see two options here:
Also, do you think we should add indexed
to the wallets in the events?
@fvictorio there are conflicts.
Fixed.
I had to inline the first argument to signerIsValid
in the confirmAddress
method because I was getting another "Stack too deep" error. Which is really weird, since in a previous commit I had to extract an inlined expression (in userAddressInfo
) to fix that error.
I guess in one case it was caused by having too many local variables and in the other by having too much nesting, but I'm not really sure. If someone knows better, please let me know.
@fvictorio
wallet
and keccakIdentifier
everywhere, but add a function that returns address by keccakIdentifier
?indexed
on wallet
Oh, that's what you were saying in your previous comment? Sorry, I got it completely backwards. I think that should work. After all, with the event and the contract you should be able to get all the relevant information.
@phahulin I just added those changes.
Regarding the indexed
, I didn't add it to the LogSignerChanged
and LogRegistryChanged
events, it didn't seem useful there.
Part of the audit findings Closes #125.
Add events to PoPA contract.