wowok 1.6.77 → 1.6.78

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/dist/utils.js CHANGED
@@ -383,7 +383,7 @@ export const MAX_NAME_LENGTH = 64;
383
383
  export const MAX_ENDPOINT_LENGTH = 1024;
384
384
  // export const OptionNone = (txb:TransactionBlock) : TransactionArgument => { return txb.pure([], BCS.U8) };
385
385
  const IsValidStringLength = (str, max_len) => {
386
- return Bcs.getInstance().ser(ValueType.TYPE_STRING, Uint8Array.from(str)).length <= max_len;
386
+ return Bcs.getInstance().ser(ValueType.TYPE_STRING, str).length <= max_len;
387
387
  };
388
388
  export const IsValidDesription = (description) => {
389
389
  return IsValidStringLength(description, MAX_DESCRIPTION_LENGTH);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wowok",
3
- "version": "1.6.77",
3
+ "version": "1.6.78",
4
4
  "description": "Create, collaborate, and transact on your own terms with the AI-driven web3 collaboration protocol.",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
package/src/utils.ts CHANGED
@@ -399,7 +399,7 @@ export const MAX_NAME_LENGTH = 64;
399
399
  export const MAX_ENDPOINT_LENGTH = 1024;
400
400
  // export const OptionNone = (txb:TransactionBlock) : TransactionArgument => { return txb.pure([], BCS.U8) };
401
401
  const IsValidStringLength = (str: string, max_len:number) : boolean => {
402
- return Bcs.getInstance().ser(ValueType.TYPE_STRING, Uint8Array.from(str)).length <= max_len
402
+ return Bcs.getInstance().ser(ValueType.TYPE_STRING, str).length <= max_len
403
403
  }
404
404
  export const IsValidDesription = (description:string) : boolean => {
405
405
  return IsValidStringLength(description, MAX_DESCRIPTION_LENGTH)