fix(communities): fix revealed addresses string comparisons (#3785)

This commit is contained in:
Jonathan Rainville 2023-07-24 09:17:12 -04:00 committed by GitHub
parent f1db6d1615
commit 38ad5dd5d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -762,7 +762,7 @@ func (m *Messenger) getAccountsToShare(addressesToReveal []string, airdropAddres
containsAddress := func(addresses []string, targetAddress string) bool {
for _, address := range addresses {
if address == targetAddress {
if types.HexToAddress(address) == types.HexToAddress(targetAddress) {
return true
}
}
@ -797,7 +797,7 @@ func (m *Messenger) getAccountsToShare(addressesToReveal []string, airdropAddres
revealedAddress := gethcommon.HexToAddress(verifiedAccount.Address.Hex())
revealedAddresses = append(revealedAddresses, revealedAddress)
address := verifiedAccount.Address.Hex()
isAirdropAddress := address == airdropAddress
isAirdropAddress := types.HexToAddress(address) == types.HexToAddress(airdropAddress)
if airdropAddress == "" {
isAirdropAddress = i == 0
}