fix(persistence): fix get revealed accounts when isAirdropAddress is nil (#3780)

This commit is contained in:
Jonathan Rainville 2023-07-19 15:23:00 -04:00 committed by GitHub
parent bbe35ce7fe
commit 12dc86fe1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -588,8 +588,8 @@ func (p *Persistence) GetRequestToJoinRevealedAddresses(requestID []byte) ([]*pr
for rows.Next() { for rows.Next() {
address := "" address := ""
chainIDsStr := "" chainIDsStr := ""
isAirDropAddress := false var isAirdropAddress sql.NullBool
err := rows.Scan(&address, &chainIDsStr, &isAirDropAddress) err := rows.Scan(&address, &chainIDsStr, &isAirdropAddress)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -608,7 +608,10 @@ func (p *Persistence) GetRequestToJoinRevealedAddresses(requestID []byte) ([]*pr
revealedAccount := &protobuf.RevealedAccount{ revealedAccount := &protobuf.RevealedAccount{
Address: address, Address: address,
ChainIds: chainIDs, ChainIds: chainIDs,
IsAirdropAddress: isAirDropAddress, IsAirdropAddress: false,
}
if isAirdropAddress.Valid {
revealedAccount.IsAirdropAddress = isAirdropAddress.Bool
} }
revealedAccounts = append(revealedAccounts, revealedAccount) revealedAccounts = append(revealedAccounts, revealedAccount)
} }