bkper-js 1.19.1 → 1.19.2
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/lib/index.d.ts +1 -0
- package/lib/model/Book.js +12 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
package/lib/model/Book.js
CHANGED
|
@@ -522,7 +522,7 @@ export class Book {
|
|
|
522
522
|
const group = (_a = this.idGroupMap) === null || _a === void 0 ? void 0 : _a.get(groupPayload.id || "");
|
|
523
523
|
if (group != null) {
|
|
524
524
|
group.addAccount(account);
|
|
525
|
-
//TODO add known group to account
|
|
525
|
+
// TODO add known group to account
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
}
|
|
@@ -631,8 +631,19 @@ export class Book {
|
|
|
631
631
|
for (const account of accountsObj) {
|
|
632
632
|
this.updateAccountCache(account);
|
|
633
633
|
}
|
|
634
|
+
this.ensureGroupsAccountMapsLoaded();
|
|
634
635
|
return accountsObj;
|
|
635
636
|
}
|
|
637
|
+
/** @internal */
|
|
638
|
+
ensureGroupsAccountMapsLoaded() {
|
|
639
|
+
if (this.idGroupMap) {
|
|
640
|
+
for (const group of this.idGroupMap.values()) {
|
|
641
|
+
if (group.accounts == null) {
|
|
642
|
+
group.accounts = new Set();
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
}
|
|
636
647
|
/**
|
|
637
648
|
* Lists transactions in the Book based on the provided query, limit, and cursor, for pagination.
|
|
638
649
|
*
|