fix(persistence): fix get revealed accounts when isAirdropAddress is nil (#3780)
This commit is contained in:
parent
bbe35ce7fe
commit
12dc86fe1b
|
@ -588,8 +588,8 @@ func (p *Persistence) GetRequestToJoinRevealedAddresses(requestID []byte) ([]*pr
|
|||
for rows.Next() {
|
||||
address := ""
|
||||
chainIDsStr := ""
|
||||
isAirDropAddress := false
|
||||
err := rows.Scan(&address, &chainIDsStr, &isAirDropAddress)
|
||||
var isAirdropAddress sql.NullBool
|
||||
err := rows.Scan(&address, &chainIDsStr, &isAirdropAddress)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -608,7 +608,10 @@ func (p *Persistence) GetRequestToJoinRevealedAddresses(requestID []byte) ([]*pr
|
|||
revealedAccount := &protobuf.RevealedAccount{
|
||||
Address: address,
|
||||
ChainIds: chainIDs,
|
||||
IsAirdropAddress: isAirDropAddress,
|
||||
IsAirdropAddress: false,
|
||||
}
|
||||
if isAirdropAddress.Valid {
|
||||
revealedAccount.IsAirdropAddress = isAirdropAddress.Bool
|
||||
}
|
||||
revealedAccounts = append(revealedAccounts, revealedAccount)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue