Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into tina/skip-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
tinaszheng committed Dec 16, 2024
2 parents 6d534f3 + 9c409a5 commit 64c1d16
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@
"@dydxprotocol/v4-client-js": "1.12.2",
"@dydxprotocol/v4-localization": "^1.1.257",
"@dydxprotocol/v4-proto": "^7.0.0-dev.0",
"@funkit/connect": "^4.0.2",
"@emotion/is-prop-valid": "^1.3.0",
"@ethersproject/providers": "^5.7.2",
"@funkit/connect": "^4.0.2",
"@hugocxl/react-to-image": "^0.0.9",
"@js-joda/core": "^5.5.3",
"@keplr-wallet/types": "^0.12.121",
Expand Down Expand Up @@ -122,7 +121,6 @@
"color": "^4.2.3",
"cosmjs-types": "^0.9.0",
"crypto-js": "^4.1.1",
"ethers": "^6.6.1",
"export-to-csv": "^1.2.3",
"fast-json-stable-stringify": "^2.1.0",
"graz": "^0.1.19",
Expand Down
11 changes: 5 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions src/hooks/useAffiliatesLeaderboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ export const useAffiliatesLeaderboard = () => {
});

const data = await response.json();
return data?.affiliateList?.map((stat: IAffiliateStats, i: number) => ({
...stat,
rank: i + 1,
}));
return data?.affiliateList
?.filter((stat: IAffiliateStats) => Boolean(stat.affiliateReferralCode))
?.map((stat: IAffiliateStats, i: number) => ({
...stat,
rank: i + 1,
}));
} catch (error) {
log('useAffiliateLeaderboard', error, { endpoint });
throw error;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import type { ChangeEvent, FormEvent } from 'react';
import { useCallback, useEffect, useMemo, useState } from 'react';

import { TYPE_URL_MSG_WITHDRAW_FROM_SUBACCOUNT } from '@dydxprotocol/v4-client-js';
import { parseUnits } from 'ethers';
import type { NumberFormatValues } from 'react-number-format';
import { shallowEqual } from 'react-redux';
import styled from 'styled-components';
import { parseUnits } from 'viem';

import { AutoSweepConfig } from '@/constants/abacus';
import { AlertType } from '@/constants/alerts';
Expand Down Expand Up @@ -180,7 +180,7 @@ export const WithdrawForm = () => {
},
recipient: dydxAddress,
assetId: 0,
quantums: parseUnits(debouncedAmount, usdcDecimals),
quantums: parseUnits(debouncedAmount, usdcDecimals).toString(),
}),
msgTypeURL: TYPE_URL_MSG_WITHDRAW_FROM_SUBACCOUNT,
},
Expand Down

0 comments on commit 64c1d16

Please sign in to comment.