@ensofinance/checkout-widget 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ensofinance/checkout-widget",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "homepage": "https://www.enso.build/",
6
6
  "repository": {
@@ -15,8 +15,16 @@ const WalletAssetStep = ({ setStep }: { setStep: (step: string) => void }) => {
15
15
  const tokenIn = useAppStore((state) => state.tokenIn);
16
16
  const setChainIdIn = useAppStore((state) => state.setChainIdIn);
17
17
  const chainIdIn = useAppStore((state) => state.chainIdIn);
18
+ const tokenOut = useAppStore((state) => state.tokenOut);
19
+ const chainIdOut = useAppStore((state) => state.chainIdOut);
18
20
  const { holdingsList, isLoading } = useWalletBalance();
19
21
 
22
+ const filteredHoldings = holdingsList?.filter(
23
+ (asset) =>
24
+ !(asset.token.toLowerCase() === tokenOut.toLowerCase() &&
25
+ asset.chainId === chainIdOut),
26
+ );
27
+
20
28
  useEffect(() => {
21
29
  setSelectedIntegration(null);
22
30
  }, []);
@@ -33,7 +41,7 @@ const WalletAssetStep = ({ setStep }: { setStep: (step: string) => void }) => {
33
41
  width="300px"
34
42
  />
35
43
  ))
36
- : holdingsList?.map((asset) => (
44
+ : filteredHoldings?.map((asset) => (
37
45
  <AssetCard
38
46
  key={`${asset.token}-${asset.chainId}`}
39
47
  chainId={asset.chainId}