@portal-hq/connect 4.4.0 → 4.5.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/lib/commonjs/index.js +2 -0
- package/lib/esm/index.js +3 -1
- package/package.json +5 -2
- package/src/index.ts +3 -0
package/lib/commonjs/index.js
CHANGED
|
@@ -335,11 +335,13 @@ class PortalConnect {
|
|
|
335
335
|
}
|
|
336
336
|
});
|
|
337
337
|
// Pass the request along to the provider
|
|
338
|
+
const traceId = (0, utils_1.generateTraceId)();
|
|
338
339
|
yield this.provider.request({
|
|
339
340
|
method,
|
|
340
341
|
params,
|
|
341
342
|
chainId: `${utils_1.CHAIN_NAMESPACES.EIP155}:${chainId}`,
|
|
342
343
|
connect: this,
|
|
344
|
+
options: { traceId },
|
|
343
345
|
});
|
|
344
346
|
});
|
|
345
347
|
}
|
package/lib/esm/index.js
CHANGED
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { Provider } from '@portal-hq/provider';
|
|
11
|
-
import { CHAIN_NAMESPACES, DEFAULT_HOSTS, sdkLogger, } from '@portal-hq/utils';
|
|
11
|
+
import { CHAIN_NAMESPACES, DEFAULT_HOSTS, generateTraceId, sdkLogger, } from '@portal-hq/utils';
|
|
12
12
|
class PortalConnect {
|
|
13
13
|
get address() {
|
|
14
14
|
return this.provider.address;
|
|
@@ -332,11 +332,13 @@ class PortalConnect {
|
|
|
332
332
|
}
|
|
333
333
|
});
|
|
334
334
|
// Pass the request along to the provider
|
|
335
|
+
const traceId = generateTraceId();
|
|
335
336
|
yield this.provider.request({
|
|
336
337
|
method,
|
|
337
338
|
params,
|
|
338
339
|
chainId: `${CHAIN_NAMESPACES.EIP155}:${chainId}`,
|
|
339
340
|
connect: this,
|
|
341
|
+
options: { traceId },
|
|
340
342
|
});
|
|
341
343
|
});
|
|
342
344
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@portal-hq/connect",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.1",
|
|
4
4
|
"main": "lib/commonjs/index",
|
|
5
5
|
"module": "lib/esm/index",
|
|
6
6
|
"source": "src/index",
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
"prepare:esm": "tsc --outDir lib/esm --module es2015 --target es2015",
|
|
19
19
|
"test": "jest"
|
|
20
20
|
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@portal-hq/utils": "^4.5.1"
|
|
23
|
+
},
|
|
21
24
|
"devDependencies": {
|
|
22
25
|
"@babel/preset-typescript": "^7.18.6",
|
|
23
26
|
"@types/jest": "^29.2.0",
|
|
@@ -32,5 +35,5 @@
|
|
|
32
35
|
"react": "*",
|
|
33
36
|
"react-native": "*"
|
|
34
37
|
},
|
|
35
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "7f010a0c86c95b2d28daa1b6640519bb9a22920a"
|
|
36
39
|
}
|
package/src/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
IPortalProvider,
|
|
8
8
|
CHAIN_NAMESPACES,
|
|
9
9
|
DEFAULT_HOSTS,
|
|
10
|
+
generateTraceId,
|
|
10
11
|
sdkLogger,
|
|
11
12
|
} from '@portal-hq/utils'
|
|
12
13
|
|
|
@@ -427,11 +428,13 @@ class PortalConnect {
|
|
|
427
428
|
)
|
|
428
429
|
|
|
429
430
|
// Pass the request along to the provider
|
|
431
|
+
const traceId = generateTraceId()
|
|
430
432
|
await this.provider.request({
|
|
431
433
|
method,
|
|
432
434
|
params,
|
|
433
435
|
chainId: `${CHAIN_NAMESPACES.EIP155}:${chainId}`,
|
|
434
436
|
connect: this,
|
|
437
|
+
options: { traceId },
|
|
435
438
|
})
|
|
436
439
|
}
|
|
437
440
|
|