phantasma-sdk-ts 0.2.3 → 0.2.4
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.
|
@@ -28,11 +28,11 @@ class TokenInfoBuilder {
|
|
|
28
28
|
tokenInfo.decimals = decimals;
|
|
29
29
|
tokenInfo.owner = creatorPublicKey;
|
|
30
30
|
tokenInfo.symbol = new SmallString_1.SmallString(symbol);
|
|
31
|
+
if (!metadata) {
|
|
32
|
+
throw new Error('metadata is required for all tokens');
|
|
33
|
+
}
|
|
34
|
+
tokenInfo.metadata = metadata;
|
|
31
35
|
if (isNFT) {
|
|
32
|
-
if (!metadata) {
|
|
33
|
-
throw new Error('metadata is required for NFTs');
|
|
34
|
-
}
|
|
35
|
-
tokenInfo.metadata = metadata;
|
|
36
36
|
if (!tokenSchemas) {
|
|
37
37
|
throw new Error('tokenSchemas is required for NFTs');
|
|
38
38
|
}
|
|
@@ -25,11 +25,11 @@ export class TokenInfoBuilder {
|
|
|
25
25
|
tokenInfo.decimals = decimals;
|
|
26
26
|
tokenInfo.owner = creatorPublicKey;
|
|
27
27
|
tokenInfo.symbol = new SmallString(symbol);
|
|
28
|
+
if (!metadata) {
|
|
29
|
+
throw new Error('metadata is required for all tokens');
|
|
30
|
+
}
|
|
31
|
+
tokenInfo.metadata = metadata;
|
|
28
32
|
if (isNFT) {
|
|
29
|
-
if (!metadata) {
|
|
30
|
-
throw new Error('metadata is required for NFTs');
|
|
31
|
-
}
|
|
32
|
-
tokenInfo.metadata = metadata;
|
|
33
33
|
if (!tokenSchemas) {
|
|
34
34
|
throw new Error('tokenSchemas is required for NFTs');
|
|
35
35
|
}
|