@ocap/message 1.30.8 → 1.30.9

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/esm/message.mjs CHANGED
@@ -372,6 +372,7 @@ function decodeAny(data) {
372
372
  */
373
373
  function encodeAny(data) {
374
374
  if (!data) return;
375
+ if (!data.typeUrl && !data.value && !data.type) return new Any();
375
376
  const anyMessage = new Any();
376
377
  try {
377
378
  if (data.typeUrl && data.value && !data.type) {
package/lib/message.cjs CHANGED
@@ -374,6 +374,7 @@ function decodeAny(data) {
374
374
  */
375
375
  function encodeAny(data) {
376
376
  if (!data) return;
377
+ if (!data.typeUrl && !data.value && !data.type) return new Any();
377
378
  const anyMessage = new Any();
378
379
  try {
379
380
  if (data.typeUrl && data.value && !data.type) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ocap/message",
3
3
  "description": "Utility functions to encode and decode message that can send to forge",
4
- "version": "1.30.8",
4
+ "version": "1.30.9",
5
5
  "author": {
6
6
  "name": "wangshijun",
7
7
  "email": "shijun@arcblock.io",
@@ -18,8 +18,8 @@
18
18
  "access": "public"
19
19
  },
20
20
  "dependencies": {
21
- "@ocap/proto": "1.30.8",
22
- "@ocap/util": "1.30.8",
21
+ "@ocap/proto": "1.30.9",
22
+ "@ocap/util": "1.30.9",
23
23
  "cborg": "^5.1.0",
24
24
  "debug": "^4.4.3",
25
25
  "google-protobuf": "3.21.0",