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/index.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/src/utils.ts +1 -1
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,
|
|
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
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,
|
|
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)
|