@portal-hq/provider 4.0.0 → 4.0.2
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.
|
@@ -49,17 +49,15 @@ class MpcSigner {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
sign(message, provider) {
|
|
52
|
-
var _a, _b;
|
|
53
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
const
|
|
55
|
-
const legacyAddress = yield this.keychain.getAddress();
|
|
53
|
+
const eip155Address = yield this.keychain.getEip155Address();
|
|
56
54
|
const apiKey = provider.apiKey;
|
|
57
55
|
const { method, chainId, curve, isRaw } = message;
|
|
58
56
|
switch (method) {
|
|
59
57
|
case 'eth_requestAccounts':
|
|
60
|
-
return [
|
|
58
|
+
return [eip155Address];
|
|
61
59
|
case 'eth_accounts':
|
|
62
|
-
return [
|
|
60
|
+
return [eip155Address];
|
|
63
61
|
default:
|
|
64
62
|
break;
|
|
65
63
|
}
|
package/lib/esm/signers/mpc.js
CHANGED
|
@@ -47,17 +47,15 @@ class MpcSigner {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
sign(message, provider) {
|
|
50
|
-
var _a, _b;
|
|
51
50
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
const
|
|
53
|
-
const legacyAddress = yield this.keychain.getAddress();
|
|
51
|
+
const eip155Address = yield this.keychain.getEip155Address();
|
|
54
52
|
const apiKey = provider.apiKey;
|
|
55
53
|
const { method, chainId, curve, isRaw } = message;
|
|
56
54
|
switch (method) {
|
|
57
55
|
case 'eth_requestAccounts':
|
|
58
|
-
return [
|
|
56
|
+
return [eip155Address];
|
|
59
57
|
case 'eth_accounts':
|
|
60
|
-
return [
|
|
58
|
+
return [eip155Address];
|
|
61
59
|
default:
|
|
62
60
|
break;
|
|
63
61
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@portal-hq/provider",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/esm/index",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"test": "jest"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@portal-hq/connect": "^4.0.
|
|
23
|
-
"@portal-hq/utils": "^4.0.
|
|
22
|
+
"@portal-hq/connect": "^4.0.2",
|
|
23
|
+
"@portal-hq/utils": "^4.0.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@babel/preset-typescript": "^7.18.6",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"ts-jest": "^29.0.3",
|
|
31
31
|
"typescript": "^4.8.4"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "606b113214bc27f6ef7f5faccf4a10b37a38111a"
|
|
34
34
|
}
|
package/src/signers/mpc.ts
CHANGED
|
@@ -46,8 +46,7 @@ class MpcSigner implements Signer {
|
|
|
46
46
|
message: SigningRequestArguments,
|
|
47
47
|
provider: IPortalProvider,
|
|
48
48
|
): Promise<any> {
|
|
49
|
-
const
|
|
50
|
-
const legacyAddress = await this.keychain.getAddress()
|
|
49
|
+
const eip155Address = await this.keychain.getEip155Address()
|
|
51
50
|
|
|
52
51
|
const apiKey = provider.apiKey
|
|
53
52
|
|
|
@@ -55,9 +54,9 @@ class MpcSigner implements Signer {
|
|
|
55
54
|
|
|
56
55
|
switch (method) {
|
|
57
56
|
case 'eth_requestAccounts':
|
|
58
|
-
return [
|
|
57
|
+
return [eip155Address]
|
|
59
58
|
case 'eth_accounts':
|
|
60
|
-
return [
|
|
59
|
+
return [eip155Address]
|
|
61
60
|
default:
|
|
62
61
|
break
|
|
63
62
|
}
|