@t2000/sdk 0.11.0 → 0.11.1
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/README.md +5 -1
- package/dist/index.cjs +6 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2605,12 +2605,16 @@ var SafeguardEnforcer = class {
|
|
|
2605
2605
|
}
|
|
2606
2606
|
}
|
|
2607
2607
|
assertNotLocked() {
|
|
2608
|
+
this.load();
|
|
2608
2609
|
if (this.config.locked) {
|
|
2609
2610
|
throw new SafeguardError("locked", {});
|
|
2610
2611
|
}
|
|
2611
2612
|
}
|
|
2612
2613
|
check(metadata) {
|
|
2613
|
-
this.
|
|
2614
|
+
this.load();
|
|
2615
|
+
if (this.config.locked) {
|
|
2616
|
+
throw new SafeguardError("locked", {});
|
|
2617
|
+
}
|
|
2614
2618
|
if (!OUTBOUND_OPS.has(metadata.operation)) return;
|
|
2615
2619
|
const amount = metadata.amount ?? 0;
|
|
2616
2620
|
if (this.config.maxPerTx > 0 && amount > this.config.maxPerTx) {
|
|
@@ -2652,6 +2656,7 @@ var SafeguardEnforcer = class {
|
|
|
2652
2656
|
this.save();
|
|
2653
2657
|
}
|
|
2654
2658
|
getConfig() {
|
|
2659
|
+
this.load();
|
|
2655
2660
|
this.resetDailyIfNewDay();
|
|
2656
2661
|
return { ...this.config };
|
|
2657
2662
|
}
|