Skip to content

Commit

Permalink
chore(blockchain-link-types): remove socks-proxy-agent dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
karliatto committed Oct 17, 2024
1 parent 881e1d6 commit 327ed78
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 1 addition & 2 deletions packages/blockchain-link-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
"dependencies": {
"@solana/web3.js": "^1.95.0",
"@trezor/type-utils": "workspace:*",
"@trezor/utxo-lib": "workspace:*",
"socks-proxy-agent": "8.0.4"
"@trezor/utxo-lib": "workspace:*"
},
"devDependencies": {
"tsx": "^4.16.3"
Expand Down
11 changes: 5 additions & 6 deletions packages/blockchain-link-types/src/common.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type tls from 'tls';
import type { Url } from 'url';
import type { SocksProxy } from 'socks';

import type { Transaction as BlockbookTransaction, VinVout } from './blockbook';
import type {
Expand All @@ -21,14 +19,15 @@ interface BaseSocksProxyAgentOptions {
port?: string | number | null;
username?: string | null;
tls?: tls.ConnectionOptions | null;
ipaddress?: string;
type: 4 | 5;
userId?: string;
password?: string;
}

// todo: connect10 here we are using the old `SocksProxyAgentOptions` from older version of socks-proxy-agent
// but we keep the old API so we do not introduce breaking changes.
interface SocksProxyAgentOptions
extends AgentOptions,
BaseSocksProxyAgentOptions,
Partial<Omit<Url & SocksProxy, keyof BaseSocksProxyAgentOptions>> {}
interface SocksProxyAgentOptions extends AgentOptions, BaseSocksProxyAgentOptions {}

export interface BlockchainSettings {
name: string;
Expand Down
1 change: 0 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11139,7 +11139,6 @@ __metadata:
"@solana/web3.js": "npm:^1.95.0"
"@trezor/type-utils": "workspace:*"
"@trezor/utxo-lib": "workspace:*"
socks-proxy-agent: "npm:8.0.4"
tsx: "npm:^4.16.3"
peerDependencies:
tslib: ^2.6.2
Expand Down

0 comments on commit 327ed78

Please sign in to comment.