From 8e6a41ce2799537c175f6e61aaba1460a0074d3e Mon Sep 17 00:00:00 2001 From: mstfash Date: Mon, 9 May 2022 11:46:19 +0200 Subject: [PATCH] fix auctions bids sorting --- src/hooks/useAuctions.ts | 4 +++- src/utils/constants.ts | 9 +-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/hooks/useAuctions.ts b/src/hooks/useAuctions.ts index 27a6cb47..f5859898 100644 --- a/src/hooks/useAuctions.ts +++ b/src/hooks/useAuctions.ts @@ -35,7 +35,9 @@ export default function useAuctions() { } = auc const isOngoingAuction = Number(auctionDeadline) * 1000 > Date.now() - const bidders = englishAuctionBids + const bidders = englishAuctionBids.sort( + (a, b) => Number(a.createdAt) - Number(b.createdAt) + ) const kickBidder = { bidder: startedBy, buyAmount: buyInitialAmount, diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 06fcf9a6..77c57af0 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -10,8 +10,6 @@ type AddressMap = { [chainId: number]: string } const { REACT_APP_GRAPH_API_URLS, REACT_APP_NETWORK_ID, - REACT_APP_COIN_TICKER_PRODUCTION, - REACT_APP_COIN_TICKER_KOVAN, REACT_APP_SYSTEM_STATUS, REACT_APP_MAILCHIMP_URL, REACT_APP_SHOW_AUCTIONS, @@ -34,12 +32,7 @@ export enum Network { export const ETH_NETWORK = REACT_APP_NETWORK_ID === '1' ? Network.MAINNET : Network.KOVAN -export const COIN_TICKER = - REACT_APP_NETWORK_ID === '1' - ? REACT_APP_COIN_TICKER_PRODUCTION - : REACT_APP_COIN_TICKER_KOVAN - ? REACT_APP_COIN_TICKER_KOVAN - : 'RAI' +export const COIN_TICKER = 'RAI' export const COLLATERAL_TYPE_ID = 'ETH-A' export const EMPTY_ADDRESS = '0x0000000000000000000000000000000000000000'