@blocklet/sdk 1.7.5 → 1.7.6
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/README.md +0 -1
- package/lib/wallet-handler.js +4 -4
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -225,7 +225,6 @@ const authenticator = new WalletAuthenticator();
|
|
|
225
225
|
|
|
226
226
|
const handlers = new WalletHandlers({
|
|
227
227
|
authenticator,
|
|
228
|
-
tokenGenerator: () => Date.now().toString(),
|
|
229
228
|
tokenStorage: new AuthStorage({
|
|
230
229
|
dbPath: path.join(process.env.BLOCKLET_DATA_DIR, 'auth.db'),
|
|
231
230
|
onload: (err) => {
|
package/lib/wallet-handler.js
CHANGED
|
@@ -7,8 +7,8 @@ const noop = () => ({});
|
|
|
7
7
|
const CONNECTED_DID_KEY = 'headers[x-connected-did]';
|
|
8
8
|
|
|
9
9
|
// whether app web page is in mobile DID wallet
|
|
10
|
-
const inMobileWallet = (
|
|
11
|
-
return
|
|
10
|
+
const inMobileWallet = (didwallet) => {
|
|
11
|
+
return didwallet && ['ios', 'android'].includes(didwallet.os);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
class WalletHandlers extends Handler {
|
|
@@ -28,7 +28,7 @@ class WalletHandlers extends Handler {
|
|
|
28
28
|
this.sendNotificationFn = sendNotificationFn || Notification.sendToUser.bind(Notification);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
getConnectedDid = ({ req,
|
|
31
|
+
getConnectedDid = ({ req, didwallet, extraParams }) => {
|
|
32
32
|
if (extraParams && extraParams.autoConnect === 'false') {
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
@@ -37,7 +37,7 @@ class WalletHandlers extends Handler {
|
|
|
37
37
|
return null;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
if (inMobileWallet(
|
|
40
|
+
if (inMobileWallet(didwallet)) {
|
|
41
41
|
return null;
|
|
42
42
|
}
|
|
43
43
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.7.
|
|
6
|
+
"version": "1.7.6",
|
|
7
7
|
"description": "graphql client to read/write data on abt node",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@abtnode/client": "1.7.
|
|
23
|
-
"@abtnode/constant": "1.7.
|
|
24
|
-
"@arcblock/did-auth": "^1.
|
|
25
|
-
"@arcblock/jwt": "^1.
|
|
26
|
-
"@arcblock/ws": "^1.
|
|
27
|
-
"@blocklet/meta": "1.7.
|
|
22
|
+
"@abtnode/client": "1.7.6",
|
|
23
|
+
"@abtnode/constant": "1.7.6",
|
|
24
|
+
"@arcblock/did-auth": "^1.16.0",
|
|
25
|
+
"@arcblock/jwt": "^1.16.0",
|
|
26
|
+
"@arcblock/ws": "^1.16.0",
|
|
27
|
+
"@blocklet/meta": "1.7.6",
|
|
28
28
|
"@nedb/core": "^1.2.2",
|
|
29
|
-
"@ocap/mcrypto": "^1.
|
|
30
|
-
"@ocap/wallet": "^1.
|
|
29
|
+
"@ocap/mcrypto": "^1.16.0",
|
|
30
|
+
"@ocap/wallet": "^1.16.0",
|
|
31
31
|
"axios": "^0.25.0",
|
|
32
32
|
"fs-extra": "^10.0.1",
|
|
33
33
|
"joi": "^17.6.0",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"detect-port": "^1.3.0",
|
|
40
40
|
"jest": "^27.4.5"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "47a9dbd6ea74419ff586336824ebb9b2fe7694aa"
|
|
43
43
|
}
|