Commit 54a5c591 by G

no more need to reverse it here, we do that in the request definition

parent 0fab2bad
...@@ -18,11 +18,8 @@ const useTransactionsHistory = () => { ...@@ -18,11 +18,8 @@ const useTransactionsHistory = () => {
const filterByReference = useCallback( const filterByReference = useCallback(
(reference: string) => { (reference: string) => {
if (!data?.length) return []; if (!data?.length) return [];
// TODO: Update this when the api is fixed
let reversed = data.reverse();
reversed = reversed.filter((transaction) => transaction.reference.length > 10);
return reversed.filter( return data.filter(
(transaction) => transaction.reference.includes(reference) && transaction.reference, (transaction) => transaction.reference.includes(reference) && transaction.reference,
); );
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment