Skip to content

Commit 67cae09

Browse files
refactor(types): update Web3TelegramConfigOptions for multichain
1 parent 4cc2b8e commit 67cae09

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/web3telegram/sendTelegram.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
MAX_DESIRED_APP_ORDER_PRICE,
44
MAX_DESIRED_DATA_ORDER_PRICE,
55
MAX_DESIRED_WORKERPOOL_ORDER_PRICE,
6-
PROD_WORKERPOOL_ADDRESS,
76
} from '../config/config.js';
87
import { handleIfProtocolError, WorkflowError } from '../utils/errors.js';
98
import { generateSecureUniqueId } from '../utils/generateUniqueId.js';
@@ -39,7 +38,7 @@ export type SendTelegram = typeof sendTelegram;
3938
export const sendTelegram = async ({
4039
graphQLClient = throwIfMissing(),
4140
iexec = throwIfMissing(),
42-
workerpoolAddressOrEns = PROD_WORKERPOOL_ADDRESS,
41+
workerpoolAddressOrEns = throwIfMissing(),
4342
dappAddressOrENS,
4443
dappWhitelistAddress,
4544
ipfsNode,
@@ -238,8 +237,8 @@ export const sendTelegram = async ({
238237
// Push telegram message to IPFS
239238
const cid = await ipfs
240239
.add(encryptedFile, {
241-
ipfsNode: ipfsNode,
242-
ipfsGateway: ipfsGateway,
240+
ipfsNode,
241+
ipfsGateway,
243242
})
244243
.catch((e) => {
245244
throw new WorkflowError({

src/web3telegram/types.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,19 @@ export type SubgraphConsumer = {
7474
export type Web3TelegramConfigOptions = {
7575
/**
7676
* The Ethereum contract address or ENS (Ethereum Name Service) for the telegram sender dapp.
77-
* If not provided, the default web3telegram address will be used.
77+
* If not provided, the default web3telegram address for the detected chain will be used.
7878
*/
7979
dappAddressOrENS?: AddressOrENS;
8080

8181
/**
8282
* The Ethereum contract address for the whitelist.
83-
* If not provided, the default whitelist smart contract address will be used.
83+
* If not provided, the default whitelist smart contract address for the detected chain will be used.
8484
*/
8585
dappWhitelistAddress?: Address;
8686

8787
/**
8888
* The subgraph URL for querying data.
89-
* If not provided, the default data protector subgraph URL will be used.
89+
* If not provided, the default data protector subgraph URL for the detected chain will be used.
9090
*/
9191
dataProtectorSubgraph?: string;
9292

@@ -98,13 +98,13 @@ export type Web3TelegramConfigOptions = {
9898

9999
/**
100100
* The IPFS node URL.
101-
* If not provided, the default IPFS node URL will be used.
101+
* If not provided, the default IPFS node URL for the detected chain will be used.
102102
*/
103103
ipfsNode?: string;
104104

105105
/**
106106
* The IPFS gateway URL.
107-
* If not provided, the default IPFS gateway URL will be used.
107+
* If not provided, the default IPFS gateway URL for the detected chain will be used.
108108
*/
109109
ipfsGateway?: string;
110110
};

0 commit comments

Comments
 (0)