Skip to content

Commit de3eada

Browse files
committed
chore: prune PNPM dependency FOD
Signed-off-by: Eric Hegnes <[email protected]>
1 parent 039ca40 commit de3eada

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+131878
-8878
lines changed

.npmrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
engine-strict=true
2+
strict-peer-dependencies=true
3+
auto-install-peers=false
4+
shared-workspace-lockfile=true
5+
resolve-peers-from-workspace-root=false

app2/.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

app2/app2.nix

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,13 @@ _: {
44
pkgs,
55
pkgsUnstable,
66
ensureAtRepositoryRoot,
7-
lib,
87
gitShortRev,
98
lastModified,
109
lastModifiedDate,
10+
buildPnpmPackage,
1111
...
1212
}:
1313
let
14-
buildPnpmPackage = import ../tools/typescript/buildPnpmPackage.nix {
15-
inherit pkgs lib;
16-
};
1714
deps = with pkgsUnstable; [
1815
python3
1916
stdenv.cc
@@ -35,24 +32,21 @@ _: {
3532
packageJsonPath = ./package.json;
3633
extraSrcs = [
3734
../app2
38-
../typescript-sdk
3935
../ts-sdk
4036
../ts-sdk-evm
4137
../ts-sdk-cosmos
4238
];
43-
hash = "sha256-+eBL34sxYBIt2SiiLeSbn93zBN/JqGDJSaKY+3DpSos=";
39+
hash = "sha256-dRkGxmO7KS00KZvcdlGxisDu8YttpNUH2NHx6pEtpyA=";
4440
buildInputs = deps;
4541
nativeBuildInputs = buildInputs;
4642
pnpmWorkspaces = [
4743
"app2"
4844
"@unionlabs/sdk"
4945
"@unionlabs/sdk-evm"
5046
"@unionlabs/sdk-cosmos"
51-
"@unionlabs/client"
5247
];
5348
buildPhase = ''
5449
runHook preBuild
55-
5650
export PUBLIC_DATADOG_CLIENT_TOKEN="${PUBLIC_DATADOG_CLIENT_TOKEN}"
5751
export PUBLIC_GIT_REV="${PUBLIC_GIT_REV}"
5852
export PUBLIC_LAST_MODIFIED_DATE="${PUBLIC_LAST_MODIFIED_DATE}"

app2/package.json

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,18 @@
1717
"supabase:generate": "supabase gen types --lang='typescript' --project-id='uorqzpuryrgfnecadajo' > './src/lib/dashboard/database.types.ts'"
1818
},
1919
"devDependencies": {
20-
"@types/node": "^24.3.1",
21-
"@aptos-labs/ts-sdk": "1.38.0",
2220
"@chain-registry/types": "^0.50.144",
2321
"@cosmjs/amino": "^0.33.1",
24-
"@cosmjs/cosmwasm-stargate": "0.33.1",
25-
"@cosmjs/math": "^0.33.1",
26-
"@cosmjs/proto-signing": "^0.33.1",
27-
"@cosmjs/stargate": "0.33.1",
28-
"@cosmjs/tendermint-rpc": "^0.33.1",
22+
"@cosmjs/cosmwasm-stargate": "catalog:",
23+
"@cosmjs/math": "0.33.1",
24+
"@cosmjs/proto-signing": "catalog:",
25+
"@cosmjs/stargate": "catalog:",
26+
"@cosmjs/tendermint-rpc": "catalog:",
2927
"@datadog/browser-logs": "^6.6.4",
30-
"@effect/experimental": "0.48.6",
31-
"@effect/platform": "0.84.6",
32-
"@effect/typeclass": "^0.35.5",
28+
"@effect/experimental": "catalog:",
29+
"@effect/platform": "catalog:",
30+
"@effect/typeclass": "catalog:",
31+
"@effect/vitest": "catalog:",
3332
"@eslint/compat": "^1.2.8",
3433
"@eslint/js": "^9.24.0",
3534
"@keplr-wallet/types": "^0.12.220",
@@ -39,42 +38,45 @@
3938
"@safe-global/safe-gateway-typescript-sdk": "^3.23.1",
4039
"@scure/base": "^1.2.4",
4140
"@supabase/supabase-js": "^2.49.4",
42-
"@sveltejs/adapter-static": "^3.0.8",
43-
"@sveltejs/kit": "^2.21.3",
44-
"@sveltejs/vite-plugin-svelte": "^5.1.0",
41+
"@sveltejs/adapter-static": "catalog:svelte",
42+
"@sveltejs/kit": "catalog:svelte",
43+
"@sveltejs/vite-plugin-svelte": "catalog:svelte",
4544
"@tailwindcss/vite": "^4.1.4",
4645
"@testing-library/jest-dom": "^6.6.3",
47-
"@testing-library/svelte": "^5.2.4",
48-
"@unionlabs/client": "workspace:*",
46+
"@testing-library/svelte": "catalog:svelte",
47+
"@types/node": "24.6.1",
4948
"@unionlabs/sdk": "workspace:*",
5049
"@unionlabs/sdk-cosmos": "workspace:*",
5150
"@unionlabs/sdk-evm": "workspace:*",
5251
"@wagmi/connectors": "^5.7.12",
5352
"@wagmi/core": "^2.16.7",
54-
"@web3modal/wagmi": "5.1.11",
5553
"clsx": "^2.1.1",
56-
"effect": "3.16.3",
54+
"effect": "catalog:",
5755
"eslint": "^9.24.0",
58-
"eslint-plugin-svelte": "^3.5.1",
56+
"eslint-plugin-svelte": "catalog:svelte",
5957
"globals": "^16.0.0",
6058
"gql.tada": "^1.8.10",
6159
"graphql": "^16.10.0",
6260
"graphql-request": "^7.1.2",
6361
"happy-dom": "^17.4.4",
6462
"knip": "^5.63.0",
6563
"ox": "^0.6.9",
64+
"react": "catalog:",
6665
"rehype-rewrite": "^4.0.2",
6766
"rehype-stringify": "^10.0.1",
6867
"remark-parse": "^11.0.0",
6968
"remark-rehype": "^11.1.2",
70-
"svelte": "^5.33.18",
71-
"svelte-check": "^4.2.1",
69+
"starknet": "catalog:",
70+
"svelte": "catalog:svelte",
71+
"svelte-check": "catalog:svelte",
7272
"tailwind-merge": "^3.2.0",
7373
"tailwindcss": "^4.1.4",
74+
"typescript": "catalog:",
7475
"typescript-eslint": "^8.30.1",
7576
"unified": "^11.0.5",
7677
"vfile": "^6.0.3",
77-
"viem": "^2.33.3",
78-
"vite": "^6.3.1"
78+
"viem": "2.33.3",
79+
"vite": "catalog:",
80+
"vitest": "catalog:"
7981
}
8082
}

app2/src/app.d.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
11
import type { Window as KeplrWindow } from "@keplr-wallet/types"
22
import type { LeapWindow } from "@leapwallet/types"
3-
import type { AptosBrowserWallet } from "@unionlabs/client"
43

54
type FeaturesQuery = ReturnType<typeof enabledFeatures>
65
type Features = NonNullable<FeaturesQuery["data"]>["v1_ibc_union_chains"]
76

8-
interface AptosWindow {
9-
aptos: AptosBrowserWallet
10-
petra: AptosBrowserWallet
11-
martian: AptosBrowserWallet
12-
okxwallet: {
13-
aptos: AptosBrowserWallet
14-
}
15-
}
16-
177
declare global {
188
namespace App {
199
// interface Locals {
@@ -24,7 +14,7 @@ declare global {
2414
// }
2515
}
2616

27-
interface Window extends AptosWindow, KeplrWindow, LeapWindow, Browser {
17+
interface Window extends KeplrWindow, LeapWindow, Browser {
2818
EventEmitter: typeof EventEmitter
2919

3020
/** Guard to ensure GitHub logo proxy patches are applied only once */

app2/src/lib/components/model/ErrorComponent.svelte

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<script lang="ts">
22
import Button from "$lib/components/ui/Button.svelte"
33
import type { GraphQLError } from "$lib/graphql/error"
4-
import { FetchAptosTokenBalanceError } from "$lib/services/aptos/balances"
54
import type { QueryBankBalanceError } from "$lib/services/cosmos/balances"
65
import type { FetchNativeBalanceError, ReadContractError } from "$lib/services/evm/balances"
76
import type { NoViemChainError } from "$lib/services/evm/clients"
@@ -73,7 +72,6 @@ interface Props {
7372
| CreateWalletClientError
7473
| CryptoError
7574
| ExecuteContractError
76-
| FetchAptosTokenBalanceError
7775
| FetchNativeBalanceError
7876
| FromHexError
7977
| GasPriceError
@@ -128,7 +126,6 @@ const getUserFriendlyMessage = pipe(
128126
FromHexError: () => `Failed to decode hex.`,
129127
GetChainInfoError: (x) => `No info for EVM chain ${x.chainId}.`, // TODO: rename to EVM
130128
NoCosmosChainInfoError: (x) => `No info for Cosmos chain ${x.chain.display_name}.`,
131-
FetchAptosTokenBalanceError: () => `Failed to fetch aptos token balance.`,
132129
NoRpcError: (error) => `No ${error.type} endpoint available for ${error.chain.display_name}.`,
133130
NoSuchElementException: () => "An unexpected error occurred.", // TODO: remove me for more explicit errors
134131
NoViemChain: () => "Chain configuration not found for the selected network.",

app2/src/lib/components/ui/Wallet/connect/connection.svelte

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
<script lang="ts">
1+
<script
2+
lang="ts"
3+
generics="T extends string"
4+
>
25
import SharpPowerIcon from "$lib/components/icons/SharpPowerIcon.svelte"
3-
import { dashboard } from "$lib/dashboard/stores/user.svelte"
4-
import { type AptosWalletId } from "$lib/wallet/aptos"
56
import { type CosmosWalletId } from "$lib/wallet/cosmos"
67
import { type EvmWalletId } from "$lib/wallet/evm"
78
import { RpcType } from "@unionlabs/sdk/schema"
89
import type { State } from "@wagmi/core"
910
import { Schema } from "effect"
10-
import { Option } from "effect"
1111
import Label from "../../Label.svelte"
1212
import Truncate from "../../Truncate.svelte"
1313
14-
type Chain = Schema.Schema.Type<typeof RpcType>
1514
type ChainConnectStatus = State["status"]
1615
type ChainWalletsInformation = ReadonlyArray<{
1716
id: string
@@ -20,30 +19,32 @@ type ChainWalletsInformation = ReadonlyArray<{
2019
download: string
2120
}>
2221
22+
interface Props {
23+
chain: T
24+
address?: string | undefined
25+
connectStatus: ChainConnectStatus
26+
chainWalletsInformation: ChainWalletsInformation
27+
connectedWalletId?:
28+
| (T extends "cosmos" ? CosmosWalletId
29+
: T extends "evm" ? EvmWalletId
30+
: never)
31+
| undefined
32+
| null
33+
onConnectClick: (walletIdentifier: string) => void | Promise<any>
34+
onDisconnectClick: () => void
35+
showDivider?: boolean
36+
}
37+
2338
let {
2439
chain,
2540
address,
2641
connectStatus,
2742
chainWalletsInformation,
28-
connectedWalletId,
43+
connectedWalletId = undefined,
2944
onConnectClick,
3045
onDisconnectClick,
3146
showDivider = true,
32-
} = $props<{
33-
chain: Chain
34-
address: string | undefined
35-
connectStatus: ChainConnectStatus
36-
chainWalletsInformation: ChainWalletsInformation
37-
connectedWalletId:
38-
| (Chain extends "cosmos" ? CosmosWalletId
39-
: Chain extends "aptos" ? AptosWalletId
40-
: EvmWalletId)
41-
| null
42-
| undefined
43-
onConnectClick: (walletIdentifier: string) => void | Promise<any>
44-
onDisconnectClick: () => void
45-
showDivider?: boolean
46-
}>()
47+
}: Props = $props()
4748
4849
let connectText = $derived(
4950
connectStatus === "connected" && address && address?.length > 0 ? address : "",
@@ -88,7 +89,7 @@ let connectedWallet = $derived(
8889
</div>
8990
{/if}
9091
91-
{#if connectStatus === "connected" && address?.length > 0}
92+
{#if connectStatus === "connected" && connectedWallet && address && address?.length > 0}
9293
<!-- Wallet Card -->
9394
<div class="w-full bg-zinc-100 dark:bg-zinc-900 rounded-lg p-4 transition-colors">
9495
<div class="flex items-center justify-between">

app2/src/lib/components/ui/Wallet/connect/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { AptosWalletId } from "$lib/wallet/aptos"
21
import type { CosmosWalletId } from "$lib/wallet/cosmos"
32
import type { EvmWalletId } from "$lib/wallet/evm"
43
import type { RpcType } from "@unionlabs/sdk/schema"
@@ -19,11 +18,10 @@ type Props<TChain extends Chain = Chain> = {
1918
address: string | undefined
2019
connectStatus: ChainConnectStatus
2120
chainWalletsInformation: ChainWalletsInformation
22-
connectedWalletId:
21+
connectedWalletId?:
2322
| (TChain extends "cosmos" ? CosmosWalletId
24-
: TChain extends "aptos" ? AptosWalletId
25-
: EvmWalletId)
26-
| null
23+
: TChain extends "evm" ? EvmWalletId
24+
: never)
2725
| undefined
2826
onConnectClick: (walletIdentifier: string) => void | Promise<void>
2927
onDisconnectClick: () => void

app2/src/lib/gasprice/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { chainInfoMap } from "$lib/services/cosmos/chain-info/config"
22
import { fallbackTransport } from "$lib/wallet/evm/wagmi-config.svelte"
33
import { createViemPublicClient } from "@unionlabs/sdk/evm"
4-
import { type Chain, NumberFromHexString, UniversalChainId } from "@unionlabs/sdk/schema"
4+
import { type Chain, UniversalChainId } from "@unionlabs/sdk/schema"
55
import {
66
Array as A,
77
BigDecimal,
@@ -20,7 +20,6 @@ import { GasPriceError } from "./error"
2020
import * as GasPrice from "./service"
2121

2222
export class GasPriceMap extends LayerMap.Service<GasPriceMap>()("GasPriceByChain", {
23-
provides: GasPrice.GasPrice,
2423
lookup: pipe(
2524
Match.type<Chain>(),
2625
Match.when(

app2/src/lib/services/aptos/balances.ts

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)