// GetRewardBalanceOfAddress returns the reward balance for the specified address, if one exists
GetRewardBalanceOfAddress returns the reward balance for the specified address, if one exists
// GetRewardBalanceOfAddress returns the reward balance for the specified address if one exists
func GetRewardBalanceOfAddress(node sqalx.Node, address string) (*RewardBalance, error) {
	s := sdb.Select().
		Where(sq.Eq{"reward_balance.rewards_address": address})
	items, _, err := getRewardBalanceWithSelect(node, s)
	if err != nil {
		return nil, stacktrace.Propagate(err, "")
	}
	if len(items) == 0 {
		return &RewardBalance{
			RewardsAddress: address,
		}, nil
	}
	return items[0], nil
}
func GetRewardBalanceOfAddress ( node sqalx . Node , address string ) ( * RewardBalance , error ) { s := sdb . Select ( ) . Where ( sq . Eq { " " : address } ) items , _ , err := getRewardBalanceWithSelect ( node , s ) if err != nil { return nil , stacktrace . Propagate ( err , " " ) } if len ( items ) == 0 { return & RewardBalance { RewardsAddress : address , } , nil } return items [ 0 ] , nil }
GetRewardBalanceOfAddress returns the reward balance for the specified address, if one exists
GetRewardBalanceOfAddress returns the reward balance for the specified address if one exists