diff --git a/components/groups/components/groupControls.tsx b/components/groups/components/groupControls.tsx index 4dcdf4d..2d67eff 100644 --- a/components/groups/components/groupControls.tsx +++ b/components/groups/components/groupControls.tsx @@ -267,7 +267,7 @@ export default function GroupProposals({

{groupName}

-
+
@@ -322,7 +322,7 @@ export default function GroupProposals({ ) : filteredProposals.length > 0 ? ( @@ -471,16 +471,18 @@ export default function GroupProposals({ )} {activeTab === 'tokens' && ( - +
+ +
)} {selectedProposal && ( diff --git a/components/groups/components/myGroups.tsx b/components/groups/components/myGroups.tsx index 0299d05..e4f5e66 100644 --- a/components/groups/components/myGroups.tsx +++ b/components/groups/components/myGroups.tsx @@ -121,7 +121,7 @@ export function YourGroups({ const [currentPageGroupInfo, setCurrentPageGroupInfo] = useState(1); const pageSizeGroupInfo = isMobile ? 4 : 7; - const pageSizeHistory = isMobile ? 4 : 7; + const pageSizeHistory = isMobile ? 4 : 6; const skeletonGroupCount = 1; const skeletonTxCount = isMobile ? 4 : 7; @@ -224,7 +224,7 @@ export function YourGroups({ const [activeInfoModalId, setActiveInfoModalId] = useState(null); const [activeMemberModalId, setActiveMemberModalId] = useState(null); - + console.log(sendTxs); return (
{truncatedAddress} {copied ? : } -
+ ); }; @@ -67,13 +67,13 @@ export const AddressWithCopy = ({ address }: { address: string }) => { }; return ( -
{address} {copied ? : } -
+ ); }; diff --git a/hooks/useQueries.ts b/hooks/useQueries.ts index b14a14e..2688236 100644 --- a/hooks/useQueries.ts +++ b/hooks/useQueries.ts @@ -871,11 +871,12 @@ export const useGetFilteredTxAndSuccessfulProposals = ( const fetchTransactions = async () => { const baseUrl = `${indexerUrl}/rpc/get_address_filtered_transactions_and_successful_proposals?address=${address}`; - // Add pagination parameters + // Update order parameter to sort by timestamp instead of height const offset = (page - 1) * pageSize; const paginationParams = `&limit=${pageSize}&offset=${offset}`; + const orderParam = `&order=data->txResponse->timestamp.desc`; // Changed from height to timestamp - const finalUrl = `${baseUrl}&order=data->txResponse->height.desc${paginationParams}`; + const finalUrl = `${baseUrl}${orderParam}${paginationParams}`; try { // First, get the total count @@ -901,7 +902,16 @@ export const useGetFilteredTxAndSuccessfulProposals = ( const transactions = dataResponse.data .flatMap((tx: any) => transformTransactions(tx, address)) - .filter((tx: any) => tx !== null); + .filter((tx: any) => tx !== null) + // Add secondary sort in JavaScript to ensure consistent ordering + .sort((a: any, b: any) => { + // Sort by timestamp descending (newest first) + const dateComparison = + new Date(b.formatted_date).getTime() - new Date(a.formatted_date).getTime(); + if (dateComparison !== 0) return dateComparison; + // If timestamps are equal, sort by block number descending + return b.block_number - a.block_number; + }); return { transactions,