@wharfkit/antelope
Advanced tools
Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "@wharfkit/antelope", | ||
"description": "Library for working with Antelope powered blockchains.", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"homepage": "https://github.com/wharfkit/antelope", | ||
@@ -6,0 +6,0 @@ "license": "BSD-3-Clause-No-Military-License", |
@@ -129,5 +129,8 @@ import {ABISerializableObject} from '../serializer/serializable' | ||
const parts = value.split(',') | ||
if (parts.length !== 2) { | ||
if (parts.length !== 2 && value !== '0,') { | ||
throw new Error('Invalid symbol string') | ||
} | ||
if (value === '0,') { | ||
parts.push('') | ||
} | ||
const precision = Number.parseInt(parts[0]) | ||
@@ -156,3 +159,3 @@ return Symbol.fromParts(parts[1], precision) | ||
} | ||
if (!SymbolCode.pattern.test(toSymbolName(value))) { | ||
if (!value.equals(0) && !SymbolCode.pattern.test(toSymbolName(value))) { | ||
throw new Error('Invalid asset symbol, name must be uppercase A-Z') | ||
@@ -234,3 +237,3 @@ } | ||
constructor(value: UInt64) { | ||
if (!SymbolCode.pattern.test(toSymbolName(value))) { | ||
if (!value.equals(0) && !SymbolCode.pattern.test(toSymbolName(value))) { | ||
throw new Error('Invalid asset symbol, name must be uppercase A-Z') | ||
@@ -237,0 +240,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1154228
20995