@blocklet/sdk 1.7.7 → 1.7.8
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/util/send-notification.js +4 -2
- package/lib/wallet-handler.js +2 -1
- package/package.json +11 -11
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* eslint-disable global-require */
|
|
2
2
|
const axios = require('axios').create({ proxy: false });
|
|
3
|
+
const pick = require('lodash/pick');
|
|
3
4
|
|
|
4
5
|
const JWT = require('@arcblock/jwt');
|
|
5
6
|
const { NODE_MODES } = require('@abtnode/constant');
|
|
@@ -29,7 +30,8 @@ module.exports = async (
|
|
|
29
30
|
options = {}
|
|
30
31
|
) => {
|
|
31
32
|
await validateReceiver(receiver);
|
|
32
|
-
|
|
33
|
+
const opt = pick(options, ['keepForOfflineUser']);
|
|
34
|
+
await validateOption(opt);
|
|
33
35
|
|
|
34
36
|
if (SERVER_MODE !== NODE_MODES.DEBUG) {
|
|
35
37
|
await validateNotification(notification);
|
|
@@ -44,7 +46,7 @@ module.exports = async (
|
|
|
44
46
|
sender: { did, token, appDid: appId },
|
|
45
47
|
receiver,
|
|
46
48
|
notification,
|
|
47
|
-
options,
|
|
49
|
+
options: opt,
|
|
48
50
|
},
|
|
49
51
|
});
|
|
50
52
|
|
package/lib/wallet-handler.js
CHANGED
|
@@ -75,7 +75,8 @@ class WalletHandlers extends Handler {
|
|
|
75
75
|
message.checkUrl = checkUrl.href;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
// sendNotificationFn maybe custom function so we need params
|
|
79
|
+
this.sendNotificationFn(connectedDid, message, params).catch((err) => {
|
|
79
80
|
console.error(err);
|
|
80
81
|
if (typeof opts.onError === 'function') {
|
|
81
82
|
opts.onError(err);
|
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.8",
|
|
7
7
|
"description": "graphql client to read/write data on abt node",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,16 +19,16 @@
|
|
|
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.16.
|
|
25
|
-
"@arcblock/jwt": "^1.16.
|
|
26
|
-
"@arcblock/ws": "^1.16.
|
|
27
|
-
"@blocklet/meta": "1.7.
|
|
22
|
+
"@abtnode/client": "1.7.8",
|
|
23
|
+
"@abtnode/constant": "1.7.8",
|
|
24
|
+
"@arcblock/did-auth": "^1.16.3",
|
|
25
|
+
"@arcblock/jwt": "^1.16.3",
|
|
26
|
+
"@arcblock/ws": "^1.16.3",
|
|
27
|
+
"@blocklet/meta": "1.7.8",
|
|
28
28
|
"@nedb/core": "^1.2.2",
|
|
29
|
-
"@ocap/mcrypto": "^1.16.
|
|
30
|
-
"@ocap/wallet": "^1.16.
|
|
31
|
-
"axios": "^0.
|
|
29
|
+
"@ocap/mcrypto": "^1.16.3",
|
|
30
|
+
"@ocap/wallet": "^1.16.3",
|
|
31
|
+
"axios": "^0.26.1",
|
|
32
32
|
"fs-extra": "^10.0.1",
|
|
33
33
|
"joi": "^17.6.0",
|
|
34
34
|
"lodash": "^4.17.21",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"detect-port": "^1.3.0",
|
|
40
40
|
"jest": "^27.4.5"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "ae75dd20b4750a31dc53c88b75ed1d95c8f15397"
|
|
43
43
|
}
|