File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ const sharedSelectCoinSql = `
107107 artist_coins.ticker,
108108 artist_coins.decimals,
109109 artist_coins.user_id,
110- sol_locker_vesting_escrows .recipient as escrow_recipient,
110+ earliest_escrow .recipient as escrow_recipient,
111111 artist_coins.logo_uri,
112112 artist_coins.banner_image_url,
113113 artist_coins.description,
@@ -211,8 +211,12 @@ const sharedSelectCoinSql = `
211211 ORDER BY created_at ASC
212212 LIMIT 1
213213 ) AS reward_pool ON true
214- LEFT JOIN sol_locker_vesting_escrows
215- ON sol_locker_vesting_escrows.token_mint = artist_coins.mint
214+ LEFT JOIN (
215+ SELECT DISTINCT ON (token_mint) token_mint, recipient
216+ FROM sol_locker_vesting_escrows
217+ ORDER BY token_mint, created_at ASC
218+ ) AS earliest_escrow
219+ ON earliest_escrow.token_mint = artist_coins.mint
216220`
217221
218222type GetArtistCoinsQueryParams struct {
You can’t perform that action at this time.
0 commit comments