@rabby-wallet/gnosis-sdk 1.4.7 → 1.4.8-alpha-1
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/dist/api.d.ts +38 -2
- package/dist/api.js +54 -8
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -1
- package/dist/utils.js +1 -0
- package/package.json +1 -1
- package/src/api.ts +100 -10
- package/src/index.ts +9 -1
- package/src/utils.ts +1 -0
package/dist/api.d.ts
CHANGED
|
@@ -41,6 +41,39 @@ export interface SafeTransactionItem {
|
|
|
41
41
|
confirmations: ConfirmationItem[];
|
|
42
42
|
signatures: string | null;
|
|
43
43
|
}
|
|
44
|
+
export type SafeOpenApiService = {
|
|
45
|
+
getSafePendingTransactions?: (params: {
|
|
46
|
+
txServiceUrl: string;
|
|
47
|
+
safeAddress: string;
|
|
48
|
+
nonce: number;
|
|
49
|
+
}) => Promise<{
|
|
50
|
+
results: SafeTransactionItem[];
|
|
51
|
+
}>;
|
|
52
|
+
postSafeTransactions?: (params: {
|
|
53
|
+
txServiceUrl: string;
|
|
54
|
+
safeAddress: string;
|
|
55
|
+
data: Record<string, any>;
|
|
56
|
+
}) => Promise<void>;
|
|
57
|
+
getSafeInfo?: (params: {
|
|
58
|
+
txServiceUrl: string;
|
|
59
|
+
safeAddress: string;
|
|
60
|
+
}) => Promise<SafeInfo>;
|
|
61
|
+
confirmSafeTransaction?: (params: {
|
|
62
|
+
txServiceUrl: string;
|
|
63
|
+
safeTransactionHash: string;
|
|
64
|
+
data: Record<string, any>;
|
|
65
|
+
}) => Promise<void>;
|
|
66
|
+
getSafeTxGas?: (params: {
|
|
67
|
+
txServiceUrl: string;
|
|
68
|
+
safeAddress: string;
|
|
69
|
+
safeTxData: {
|
|
70
|
+
to: string;
|
|
71
|
+
value?: string;
|
|
72
|
+
data?: string | null;
|
|
73
|
+
operation?: number;
|
|
74
|
+
};
|
|
75
|
+
}) => Promise<string | undefined>;
|
|
76
|
+
};
|
|
44
77
|
export declare const GNOSIS_SUPPORT_CHAINS: string[];
|
|
45
78
|
export declare const HOST_MAP: {
|
|
46
79
|
/**
|
|
@@ -50,11 +83,14 @@ export declare const HOST_MAP: {
|
|
|
50
83
|
};
|
|
51
84
|
export declare const getTxServiceUrl: (chainId: string) => any;
|
|
52
85
|
export default class RequestProvider {
|
|
53
|
-
|
|
86
|
+
prefix: string;
|
|
54
87
|
request: Axios;
|
|
55
|
-
|
|
88
|
+
openapiService?: SafeOpenApiService;
|
|
89
|
+
shouldUseOpenapiService: boolean;
|
|
90
|
+
constructor({ networkId, adapter, openapiService, }: {
|
|
56
91
|
networkId: string;
|
|
57
92
|
adapter?: AxiosAdapter;
|
|
93
|
+
openapiService?: SafeOpenApiService;
|
|
58
94
|
});
|
|
59
95
|
getPendingTransactions(safeAddress: string, nonce: number): Promise<{
|
|
60
96
|
results: SafeTransactionItem[];
|
package/dist/api.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ethers } from "ethers";
|
|
2
2
|
import { isLegacyVersion } from "./utils";
|
|
3
3
|
import axios from "axios";
|
|
4
|
-
const TRANSACTION_SERVICE_URL = "https://api.rabby.io/v1/safe-tx-service";
|
|
5
4
|
// https://github.com/safe-global/safe-core-sdk/blob/main/packages/api-kit/src/utils/config.ts
|
|
6
5
|
const networks = [
|
|
7
6
|
{
|
|
@@ -208,19 +207,21 @@ export const HOST_MAP = {
|
|
|
208
207
|
export const getTxServiceUrl = (chainId) => {
|
|
209
208
|
const shortName = networkMap[chainId];
|
|
210
209
|
if (shortName) {
|
|
211
|
-
return
|
|
210
|
+
return `/v1/safe-tx-service/${shortName}/api`;
|
|
212
211
|
}
|
|
213
212
|
return HOST_MAP[chainId];
|
|
214
213
|
};
|
|
215
214
|
export default class RequestProvider {
|
|
216
|
-
constructor({ networkId, adapter, }) {
|
|
215
|
+
constructor({ networkId, adapter, openapiService, }) {
|
|
217
216
|
const txServiceUrl = getTxServiceUrl(networkId);
|
|
218
217
|
if (!txServiceUrl) {
|
|
219
218
|
throw new Error("Wrong networkId");
|
|
220
219
|
}
|
|
221
|
-
this.
|
|
220
|
+
this.prefix = txServiceUrl;
|
|
221
|
+
this.openapiService = openapiService;
|
|
222
|
+
this.shouldUseOpenapiService = !/^https?:\/\//i.test(this.prefix);
|
|
222
223
|
this.request = axios.create({
|
|
223
|
-
baseURL: this.
|
|
224
|
+
baseURL: this.prefix,
|
|
224
225
|
adapter,
|
|
225
226
|
});
|
|
226
227
|
this.request.interceptors.response.use((response) => {
|
|
@@ -228,7 +229,16 @@ export default class RequestProvider {
|
|
|
228
229
|
});
|
|
229
230
|
}
|
|
230
231
|
getPendingTransactions(safeAddress, nonce) {
|
|
231
|
-
|
|
232
|
+
const checksumAddress = ethers.utils.getAddress(safeAddress);
|
|
233
|
+
if (this.shouldUseOpenapiService &&
|
|
234
|
+
this.openapiService?.getSafePendingTransactions) {
|
|
235
|
+
return this.openapiService.getSafePendingTransactions({
|
|
236
|
+
txServiceUrl: this.prefix,
|
|
237
|
+
safeAddress: checksumAddress,
|
|
238
|
+
nonce,
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
return this.request.get(`/v1/safes/${checksumAddress}/multisig-transactions/`, {
|
|
232
242
|
params: {
|
|
233
243
|
executed: false,
|
|
234
244
|
nonce__gte: nonce,
|
|
@@ -236,12 +246,36 @@ export default class RequestProvider {
|
|
|
236
246
|
});
|
|
237
247
|
}
|
|
238
248
|
postTransactions(safeAddres, data) {
|
|
239
|
-
|
|
249
|
+
const checksumAddress = ethers.utils.getAddress(safeAddres);
|
|
250
|
+
if (this.shouldUseOpenapiService &&
|
|
251
|
+
this.openapiService?.postSafeTransactions) {
|
|
252
|
+
return this.openapiService.postSafeTransactions({
|
|
253
|
+
txServiceUrl: this.prefix,
|
|
254
|
+
safeAddress: checksumAddress,
|
|
255
|
+
data,
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
return this.request.post(`/v1/safes/${checksumAddress}/multisig-transactions/`, data);
|
|
240
259
|
}
|
|
241
260
|
getSafeInfo(safeAddress) {
|
|
242
|
-
|
|
261
|
+
const checksumAddress = ethers.utils.getAddress(safeAddress);
|
|
262
|
+
if (this.shouldUseOpenapiService && this.openapiService?.getSafeInfo) {
|
|
263
|
+
return this.openapiService.getSafeInfo({
|
|
264
|
+
txServiceUrl: this.prefix,
|
|
265
|
+
safeAddress: checksumAddress,
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
return this.request.get(`/v1/safes/${checksumAddress}/`);
|
|
243
269
|
}
|
|
244
270
|
confirmTransaction(safeTransactionHash, data) {
|
|
271
|
+
if (this.shouldUseOpenapiService &&
|
|
272
|
+
this.openapiService?.confirmSafeTransaction) {
|
|
273
|
+
return this.openapiService.confirmSafeTransaction({
|
|
274
|
+
txServiceUrl: this.prefix,
|
|
275
|
+
safeTransactionHash,
|
|
276
|
+
data,
|
|
277
|
+
});
|
|
278
|
+
}
|
|
245
279
|
return this.request.post(`/v1/multisig-transactions/${safeTransactionHash}/confirmations/`, data);
|
|
246
280
|
}
|
|
247
281
|
// https://github.com/safe-global/safe-wallet-web/blob/dev/src/services/tx/tx-sender/recommendedNonce.ts#L24
|
|
@@ -251,6 +285,18 @@ export default class RequestProvider {
|
|
|
251
285
|
if (!isSafeTxGasRequired)
|
|
252
286
|
return "0";
|
|
253
287
|
const address = ethers.utils.getAddress(safeAddress);
|
|
288
|
+
if (this.shouldUseOpenapiService && this.openapiService?.getSafeTxGas) {
|
|
289
|
+
return this.openapiService.getSafeTxGas({
|
|
290
|
+
txServiceUrl: this.prefix,
|
|
291
|
+
safeAddress: address,
|
|
292
|
+
safeTxData: {
|
|
293
|
+
to: ethers.utils.getAddress(safeTxData.to),
|
|
294
|
+
value: safeTxData.value || "0",
|
|
295
|
+
data: safeTxData.data,
|
|
296
|
+
operation: safeTxData.operation,
|
|
297
|
+
},
|
|
298
|
+
});
|
|
299
|
+
}
|
|
254
300
|
try {
|
|
255
301
|
const estimation = await this.request.post(`/v1/safes/${address}/multisig-transactions/estimations/`, {
|
|
256
302
|
to: ethers.utils.getAddress(safeTxData.to),
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Contract, providers } from "ethers";
|
|
|
4
4
|
import { TransactionOptions, TransactionResult, SafeSignature, SafeTransaction, SafeTransactionDataPartial } from "@safe-global/types-kit";
|
|
5
5
|
import { EthSafeMessage, EthSafeTransaction } from "@safe-global/protocol-kit";
|
|
6
6
|
import SafeApiKit, { SafeMessage as ApiKitSafeMessage } from "@safe-global/api-kit";
|
|
7
|
-
import RequestProvider, { SafeInfo } from "./api";
|
|
7
|
+
import RequestProvider, { SafeInfo, SafeOpenApiService } from "./api";
|
|
8
8
|
declare class Safe {
|
|
9
9
|
contract: Contract;
|
|
10
10
|
safeAddress: string;
|
|
@@ -16,6 +16,7 @@ declare class Safe {
|
|
|
16
16
|
network: string;
|
|
17
17
|
apiKit: SafeApiKit;
|
|
18
18
|
static adapter: AxiosAdapter;
|
|
19
|
+
static openapiService?: SafeOpenApiService;
|
|
19
20
|
constructor(safeAddress: string, version: string, provider: providers.Web3Provider, network?: string);
|
|
20
21
|
/**
|
|
21
22
|
* @deprecated
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { calculateSafeMessageHash } from "@safe-global/protocol-kit/dist/src/uti
|
|
|
5
5
|
import SafeApiKit from "@safe-global/api-kit";
|
|
6
6
|
// import { getTransactionServiceUrl } from "@safe-global/api-kit/dist/src/utils/config";
|
|
7
7
|
import { getSafeSingletonDeployment } from "@safe-global/safe-deployments";
|
|
8
|
-
import RequestProvider, { getTxServiceUrl } from "./api";
|
|
8
|
+
import RequestProvider, { getTxServiceUrl, } from "./api";
|
|
9
9
|
import { generatePreValidatedSignature, generateSignature, sameString, standardizeSafeTransactionData, } from "./utils";
|
|
10
10
|
class Safe {
|
|
11
11
|
constructor(safeAddress, version, provider, network = "1") {
|
|
@@ -56,6 +56,7 @@ class Safe {
|
|
|
56
56
|
this.request = new RequestProvider({
|
|
57
57
|
networkId: network,
|
|
58
58
|
adapter: Safe.adapter,
|
|
59
|
+
openapiService: Safe.openapiService,
|
|
59
60
|
});
|
|
60
61
|
this.apiKit = Safe.createSafeApiKit(network);
|
|
61
62
|
// this.init();
|
|
@@ -70,6 +71,7 @@ class Safe {
|
|
|
70
71
|
const request = new RequestProvider({
|
|
71
72
|
networkId: network,
|
|
72
73
|
adapter: Safe.adapter,
|
|
74
|
+
openapiService: Safe.openapiService,
|
|
73
75
|
});
|
|
74
76
|
return request.getSafeInfo(ethers.utils.getAddress(safeAddress));
|
|
75
77
|
}
|
|
@@ -77,6 +79,7 @@ class Safe {
|
|
|
77
79
|
const request = new RequestProvider({
|
|
78
80
|
networkId: network,
|
|
79
81
|
adapter: Safe.adapter,
|
|
82
|
+
openapiService: Safe.openapiService,
|
|
80
83
|
});
|
|
81
84
|
const transactions = await request.getPendingTransactions(safeAddress, nonce);
|
|
82
85
|
return transactions;
|
package/dist/utils.js
CHANGED
|
@@ -100,6 +100,7 @@ export async function standardizeSafeTransactionData(safeAddress, safeContract,
|
|
|
100
100
|
const request = new RequestProvider({
|
|
101
101
|
networkId: network,
|
|
102
102
|
adapter: Safe.adapter,
|
|
103
|
+
openapiService: Safe.openapiService,
|
|
103
104
|
});
|
|
104
105
|
const safeTxGas = tx.safeTxGas ??
|
|
105
106
|
(await request.getSafeTxGas(safeAddress, version, standardizedTxs));
|
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -47,7 +47,37 @@ export interface SafeTransactionItem {
|
|
|
47
47
|
signatures: string | null;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
export type SafeOpenApiService = {
|
|
51
|
+
getSafePendingTransactions?: (params: {
|
|
52
|
+
txServiceUrl: string;
|
|
53
|
+
safeAddress: string;
|
|
54
|
+
nonce: number;
|
|
55
|
+
}) => Promise<{ results: SafeTransactionItem[] }>;
|
|
56
|
+
postSafeTransactions?: (params: {
|
|
57
|
+
txServiceUrl: string;
|
|
58
|
+
safeAddress: string;
|
|
59
|
+
data: Record<string, any>;
|
|
60
|
+
}) => Promise<void>;
|
|
61
|
+
getSafeInfo?: (params: {
|
|
62
|
+
txServiceUrl: string;
|
|
63
|
+
safeAddress: string;
|
|
64
|
+
}) => Promise<SafeInfo>;
|
|
65
|
+
confirmSafeTransaction?: (params: {
|
|
66
|
+
txServiceUrl: string;
|
|
67
|
+
safeTransactionHash: string;
|
|
68
|
+
data: Record<string, any>;
|
|
69
|
+
}) => Promise<void>;
|
|
70
|
+
getSafeTxGas?: (params: {
|
|
71
|
+
txServiceUrl: string;
|
|
72
|
+
safeAddress: string;
|
|
73
|
+
safeTxData: {
|
|
74
|
+
to: string;
|
|
75
|
+
value?: string;
|
|
76
|
+
data?: string | null;
|
|
77
|
+
operation?: number;
|
|
78
|
+
};
|
|
79
|
+
}) => Promise<string | undefined>;
|
|
80
|
+
};
|
|
51
81
|
|
|
52
82
|
type NetworkShortName = {
|
|
53
83
|
shortName: string;
|
|
@@ -267,31 +297,37 @@ export const HOST_MAP = {
|
|
|
267
297
|
export const getTxServiceUrl = (chainId: string) => {
|
|
268
298
|
const shortName = networkMap[chainId];
|
|
269
299
|
if (shortName) {
|
|
270
|
-
return
|
|
300
|
+
return `/v1/safe-tx-service/${shortName}/api`;
|
|
271
301
|
}
|
|
272
302
|
return HOST_MAP[chainId];
|
|
273
303
|
};
|
|
274
304
|
|
|
275
305
|
export default class RequestProvider {
|
|
276
|
-
|
|
306
|
+
prefix: string;
|
|
277
307
|
request: Axios;
|
|
308
|
+
openapiService?: SafeOpenApiService;
|
|
309
|
+
shouldUseOpenapiService: boolean;
|
|
278
310
|
|
|
279
311
|
constructor({
|
|
280
312
|
networkId,
|
|
281
313
|
adapter,
|
|
314
|
+
openapiService,
|
|
282
315
|
}: {
|
|
283
316
|
networkId: string;
|
|
284
317
|
adapter?: AxiosAdapter;
|
|
318
|
+
openapiService?: SafeOpenApiService;
|
|
285
319
|
}) {
|
|
286
320
|
const txServiceUrl = getTxServiceUrl(networkId);
|
|
287
321
|
if (!txServiceUrl) {
|
|
288
322
|
throw new Error("Wrong networkId");
|
|
289
323
|
}
|
|
290
324
|
|
|
291
|
-
this.
|
|
325
|
+
this.prefix = txServiceUrl;
|
|
326
|
+
this.openapiService = openapiService;
|
|
327
|
+
this.shouldUseOpenapiService = !/^https?:\/\//i.test(this.prefix);
|
|
292
328
|
|
|
293
329
|
this.request = axios.create({
|
|
294
|
-
baseURL: this.
|
|
330
|
+
baseURL: this.prefix,
|
|
295
331
|
adapter,
|
|
296
332
|
});
|
|
297
333
|
|
|
@@ -304,10 +340,20 @@ export default class RequestProvider {
|
|
|
304
340
|
safeAddress: string,
|
|
305
341
|
nonce: number
|
|
306
342
|
): Promise<{ results: SafeTransactionItem[] }> {
|
|
343
|
+
const checksumAddress = ethers.utils.getAddress(safeAddress);
|
|
344
|
+
if (
|
|
345
|
+
this.shouldUseOpenapiService &&
|
|
346
|
+
this.openapiService?.getSafePendingTransactions
|
|
347
|
+
) {
|
|
348
|
+
return this.openapiService.getSafePendingTransactions({
|
|
349
|
+
txServiceUrl: this.prefix,
|
|
350
|
+
safeAddress: checksumAddress,
|
|
351
|
+
nonce,
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
|
|
307
355
|
return this.request.get(
|
|
308
|
-
`/v1/safes/${
|
|
309
|
-
safeAddress
|
|
310
|
-
)}/multisig-transactions/`,
|
|
356
|
+
`/v1/safes/${checksumAddress}/multisig-transactions/`,
|
|
311
357
|
{
|
|
312
358
|
params: {
|
|
313
359
|
executed: false,
|
|
@@ -318,19 +364,50 @@ export default class RequestProvider {
|
|
|
318
364
|
}
|
|
319
365
|
|
|
320
366
|
postTransactions(safeAddres: string, data): Promise<void> {
|
|
367
|
+
const checksumAddress = ethers.utils.getAddress(safeAddres);
|
|
368
|
+
if (
|
|
369
|
+
this.shouldUseOpenapiService &&
|
|
370
|
+
this.openapiService?.postSafeTransactions
|
|
371
|
+
) {
|
|
372
|
+
return this.openapiService.postSafeTransactions({
|
|
373
|
+
txServiceUrl: this.prefix,
|
|
374
|
+
safeAddress: checksumAddress,
|
|
375
|
+
data,
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
|
|
321
379
|
return this.request.post(
|
|
322
|
-
`/v1/safes/${
|
|
380
|
+
`/v1/safes/${checksumAddress}/multisig-transactions/`,
|
|
323
381
|
data
|
|
324
382
|
);
|
|
325
383
|
}
|
|
326
384
|
|
|
327
385
|
getSafeInfo(safeAddress: string): Promise<SafeInfo> {
|
|
386
|
+
const checksumAddress = ethers.utils.getAddress(safeAddress);
|
|
387
|
+
if (this.shouldUseOpenapiService && this.openapiService?.getSafeInfo) {
|
|
388
|
+
return this.openapiService.getSafeInfo({
|
|
389
|
+
txServiceUrl: this.prefix,
|
|
390
|
+
safeAddress: checksumAddress,
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
|
|
328
394
|
return this.request.get(
|
|
329
|
-
`/v1/safes/${
|
|
395
|
+
`/v1/safes/${checksumAddress}/`
|
|
330
396
|
);
|
|
331
397
|
}
|
|
332
398
|
|
|
333
399
|
confirmTransaction(safeTransactionHash: string, data): Promise<void> {
|
|
400
|
+
if (
|
|
401
|
+
this.shouldUseOpenapiService &&
|
|
402
|
+
this.openapiService?.confirmSafeTransaction
|
|
403
|
+
) {
|
|
404
|
+
return this.openapiService.confirmSafeTransaction({
|
|
405
|
+
txServiceUrl: this.prefix,
|
|
406
|
+
safeTransactionHash,
|
|
407
|
+
data,
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
|
|
334
411
|
return this.request.post(
|
|
335
412
|
`/v1/multisig-transactions/${safeTransactionHash}/confirmations/`,
|
|
336
413
|
data
|
|
@@ -350,6 +427,19 @@ export default class RequestProvider {
|
|
|
350
427
|
|
|
351
428
|
const address = ethers.utils.getAddress(safeAddress);
|
|
352
429
|
|
|
430
|
+
if (this.shouldUseOpenapiService && this.openapiService?.getSafeTxGas) {
|
|
431
|
+
return this.openapiService.getSafeTxGas({
|
|
432
|
+
txServiceUrl: this.prefix,
|
|
433
|
+
safeAddress: address,
|
|
434
|
+
safeTxData: {
|
|
435
|
+
to: ethers.utils.getAddress(safeTxData.to),
|
|
436
|
+
value: safeTxData.value || "0",
|
|
437
|
+
data: safeTxData.data,
|
|
438
|
+
operation: safeTxData.operation,
|
|
439
|
+
},
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
|
|
353
443
|
try {
|
|
354
444
|
const estimation: { safeTxGas: string } = await this.request.post(
|
|
355
445
|
`/v1/safes/${address}/multisig-transactions/estimations/`,
|
package/src/index.ts
CHANGED
|
@@ -16,7 +16,11 @@ import SafeApiKit, {
|
|
|
16
16
|
} from "@safe-global/api-kit";
|
|
17
17
|
// import { getTransactionServiceUrl } from "@safe-global/api-kit/dist/src/utils/config";
|
|
18
18
|
import { getSafeSingletonDeployment } from "@safe-global/safe-deployments";
|
|
19
|
-
import RequestProvider, {
|
|
19
|
+
import RequestProvider, {
|
|
20
|
+
getTxServiceUrl,
|
|
21
|
+
SafeInfo,
|
|
22
|
+
SafeOpenApiService,
|
|
23
|
+
} from "./api";
|
|
20
24
|
import {
|
|
21
25
|
estimateGasForTransactionExecution,
|
|
22
26
|
generatePreValidatedSignature,
|
|
@@ -37,6 +41,7 @@ class Safe {
|
|
|
37
41
|
apiKit: SafeApiKit;
|
|
38
42
|
|
|
39
43
|
static adapter: AxiosAdapter;
|
|
44
|
+
static openapiService?: SafeOpenApiService;
|
|
40
45
|
|
|
41
46
|
constructor(
|
|
42
47
|
safeAddress: string,
|
|
@@ -59,6 +64,7 @@ class Safe {
|
|
|
59
64
|
this.request = new RequestProvider({
|
|
60
65
|
networkId: network,
|
|
61
66
|
adapter: Safe.adapter,
|
|
67
|
+
openapiService: Safe.openapiService,
|
|
62
68
|
});
|
|
63
69
|
this.apiKit = Safe.createSafeApiKit(network);
|
|
64
70
|
|
|
@@ -75,6 +81,7 @@ class Safe {
|
|
|
75
81
|
const request = new RequestProvider({
|
|
76
82
|
networkId: network,
|
|
77
83
|
adapter: Safe.adapter,
|
|
84
|
+
openapiService: Safe.openapiService,
|
|
78
85
|
});
|
|
79
86
|
return request.getSafeInfo(ethers.utils.getAddress(safeAddress));
|
|
80
87
|
}
|
|
@@ -87,6 +94,7 @@ class Safe {
|
|
|
87
94
|
const request = new RequestProvider({
|
|
88
95
|
networkId: network,
|
|
89
96
|
adapter: Safe.adapter,
|
|
97
|
+
openapiService: Safe.openapiService,
|
|
90
98
|
});
|
|
91
99
|
const transactions = await request.getPendingTransactions(
|
|
92
100
|
safeAddress,
|
package/src/utils.ts
CHANGED