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() {
|
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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue