Skip to content

Commit

Permalink
fix(dcellar-web-ui): sort error
Browse files Browse the repository at this point in the history
  • Loading branch information
devinxl committed Oct 30, 2023
1 parent bec5105 commit 8b2453a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { selectAllCost } from '@/store/slices/billing';
import { BN } from '@/utils/math';
import { TAccountInfo } from '@/store/slices/accounts';
import { formatObjectAddress } from '@/utils/accounts';
import { isEmpty } from 'lodash-es';

const colors = ['#009E2C', '#008425', '#005417', '#C2EECE'];

Expand All @@ -20,7 +21,7 @@ export const TotalCost = memo(() => {
const pieData = useMemo(() => {
if (loadingAllCost || loadingAllCostTrend || isLoadingPaymentAccounts) return;
const lowerKeyAccountInfo: Record<string, TAccountInfo> = formatObjectAddress(accountInfo)
const temp = (totalCost.detailCosts || []).sort((a, b) => {
const temp = [...(totalCost.detailCosts || [])].sort((a, b) => {
return BN(b.cost).comparedTo(a.cost);
});
const newData = [];
Expand Down

0 comments on commit 8b2453a

Please sign in to comment.