Skip to content

Commit f347cc9

Browse files
Show migrated when damm exists in artist_coins table (#545)
1 parent d05a51c commit f347cc9

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎api/v1_coins.go‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,14 @@ const sharedSelectCoinSql = `
166166
'address', COALESCE(artist_coin_pools.address, ''),
167167
'price', COALESCE(artist_coin_pools.price, 0),
168168
'priceUSD', COALESCE(artist_coin_pools.price_usd, 0),
169-
'curveProgress', COALESCE(artist_coin_pools.curve_progress, 0),
170-
'isMigrated', COALESCE(artist_coin_pools.is_migrated, false),
169+
'curveProgress', CASE
170+
WHEN artist_coins.damm_v2_pool IS NOT NULL THEN 1
171+
ELSE COALESCE(artist_coin_pools.curve_progress, 0)
172+
END,
173+
'isMigrated', CASE
174+
WHEN artist_coins.damm_v2_pool IS NOT NULL THEN true
175+
ELSE COALESCE(artist_coin_pools.is_migrated, false)
176+
END,
171177
'creatorQuoteFee', COALESCE(artist_coin_pools.creator_quote_fee, 0),
172178
'totalTradingQuoteFee', COALESCE(artist_coin_pools.total_trading_quote_fee, 0),
173179
'creatorWalletAddress', COALESCE(artist_coin_pools.creator_wallet_address, '')

0 commit comments

Comments
 (0)