otomato-sdk 2.0.98 → 2.0.99
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.
|
@@ -20,7 +20,7 @@ export class Action extends Node {
|
|
|
20
20
|
state: json.state,
|
|
21
21
|
});
|
|
22
22
|
for (const [key, value] of Object.entries(json.parameters)) {
|
|
23
|
-
if (
|
|
23
|
+
if (value === undefined || value === null) {
|
|
24
24
|
continue;
|
|
25
25
|
}
|
|
26
26
|
switch (key) {
|
|
@@ -35,7 +35,7 @@ export class Action extends Node {
|
|
|
35
35
|
for (const abiKey in abiParameters) {
|
|
36
36
|
const enrichedParameter = enriched.block.parameters.find((param) => param.key === `abiParams.${abiKey}`);
|
|
37
37
|
const paramType = enrichedParameter ? enrichedParameter.type : null;
|
|
38
|
-
if (
|
|
38
|
+
if (abiParameters[abiKey] === undefined || abiParameters[abiKey] === null || paramType === null)
|
|
39
39
|
continue;
|
|
40
40
|
if (typeIsNumber(paramType) && typeof abiParameters[abiKey] === 'string' && abiParameters[abiKey].endsWith('n')) {
|
|
41
41
|
action.setParams(abiKey, BigInt(abiParameters[abiKey].slice(0, -1)));
|
package/dist/src/models/Node.js
CHANGED
|
@@ -93,7 +93,7 @@ export class Node {
|
|
|
93
93
|
if (validateType(param.type, value)) {
|
|
94
94
|
this.parameters[key].value = value;
|
|
95
95
|
}
|
|
96
|
-
else if (
|
|
96
|
+
else if (value === undefined || value === null || value === "") {
|
|
97
97
|
this.parameters[key].value = null;
|
|
98
98
|
}
|
|
99
99
|
else {
|
|
@@ -36,7 +36,7 @@ export class Trigger extends Node {
|
|
|
36
36
|
state: json.state,
|
|
37
37
|
});
|
|
38
38
|
for (const [key, value] of Object.entries(json.parameters)) {
|
|
39
|
-
if (
|
|
39
|
+
if (value === undefined || value === null) {
|
|
40
40
|
continue;
|
|
41
41
|
}
|
|
42
42
|
switch (key) {
|
|
@@ -57,7 +57,7 @@ export class Trigger extends Node {
|
|
|
57
57
|
for (const abiKey in abiParameters) {
|
|
58
58
|
const enrichedParameter = enriched.block.parameters.find((param) => param.key === `abiParams.${abiKey}`);
|
|
59
59
|
const paramType = enrichedParameter ? enrichedParameter.type : null;
|
|
60
|
-
if (
|
|
60
|
+
if (abiParameters[abiKey] === undefined || abiParameters[abiKey] === null || paramType === null)
|
|
61
61
|
continue;
|
|
62
62
|
if (typeIsNumber(paramType) && typeof abiParameters[abiKey] === 'string' && abiParameters[abiKey].endsWith('n')) {
|
|
63
63
|
trigger.setParams(abiKey, BigInt(abiParameters[abiKey].slice(0, -1)));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.99";
|
|
2
2
|
export declare function compareVersions(v1: string, v2: string): number;
|