Commit 796ef040 by G

more manual fix, filtering bad data in response while waiting for api to get fixed

parent 94bc5b9c
...@@ -19,9 +19,12 @@ const useTransactionsHistory = () => { ...@@ -19,9 +19,12 @@ const useTransactionsHistory = () => {
(reference: string) => { (reference: string) => {
if (!data?.length) return []; if (!data?.length) return [];
// TODO: Update this when the api is fixed // TODO: Update this when the api is fixed
const reversed = data.reverse(); let reversed = data.reverse();
reversed = reversed.filter((transaction) => transaction.reference.length > 10);
return reversed.filter((transaction) => transaction.reference.includes(reference)); return reversed.filter(
(transaction) => transaction.reference.includes(reference) && transaction.reference,
);
}, },
[data], [data],
); );
......
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