// GetRewardBalancesReadyForAutoWithdrawal returns rewards balances
// that are ready for automated withdrawal according to the passed parameters
GetRewardBalancesReadyForAutoWithdrawal returns rewards balances
that are ready for automated withdrawal according to the passed parameters
// GetRewardBalancesReadyForAutoWithdrawal returns rewards balances // that are ready for automated withdrawal according to the passed parameters
func GetRewardBalancesReadyForAutoWithdrawal(node sqalx.Node, minBalance decimal.Decimal, unchangedSince time.Time) ([]*RewardBalance, error) {
	s := sdb.Select().
		Where(sq.Gt{"reward_balance.balance": decimal.Zero}).
		Where(sq.Or{
			sq.GtOrEq{"reward_balance.balance": minBalance},
			sq.Lt{"reward_balance.updated_at": unchangedSince},
		}).
		Where(sq.Expr("reward_balance.rewards_address NOT IN (SELECT rewards_address FROM pending_withdrawal)"))
	items, _, err := getRewardBalanceWithSelect(node, s)
	return items, stacktrace.Propagate(err, "")
}
func GetRewardBalancesReadyForAutoWithdrawal ( node sqalx . Node , minBalance decimal . Decimal , unchangedSince time . Time ) ( [ ] * RewardBalance , error ) { s := sdb . Select ( ) . Where ( sq . Gt { " " : decimal . Zero } ) . Where ( sq . Or { sq . GtOrEq { " " : minBalance } , sq . Lt { " " : unchangedSince } , } ) . Where ( sq . Expr ( " " ) ) items , _ , err := getRewardBalanceWithSelect ( node , s ) return items , stacktrace . Propagate ( err , " " ) }
GetRewardBalancesReadyForAutoWithdrawal returns rewards balances
that are ready for automated withdrawal according to the passed parameters
GetRewardBalancesReadyForAutoWithdrawal returns rewards balances that are ready for automated withdrawal according to the passed parameters