@develit-services/bank 0.8.16 → 0.8.17

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.
@@ -1060,8 +1060,11 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
1060
1060
  const { credentials, accounts } = await connector.authorizeAccount({
1061
1061
  urlParams
1062
1062
  });
1063
- const alreadyExistingAccounts = (await this._getAccounts()).accounts.filter(
1064
- (acc) => acc.connectorKey === ottRow.refId && accounts.map((item) => item.iban).includes(acc.iban)
1063
+ const alreadyExistingAccounts = (await this._getAccounts({
1064
+ filterIbans: accounts.map((item) => item.iban),
1065
+ limit: Number.MAX_SAFE_INTEGER
1066
+ })).accounts.filter(
1067
+ (acc) => acc.connectorKey === ottRow.refId
1065
1068
  );
1066
1069
  const upsertAccounts = accounts.map((acc) => {
1067
1070
  const existingAccount = alreadyExistingAccounts.find(
@@ -1058,8 +1058,11 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
1058
1058
  const { credentials, accounts } = await connector.authorizeAccount({
1059
1059
  urlParams
1060
1060
  });
1061
- const alreadyExistingAccounts = (await this._getAccounts()).accounts.filter(
1062
- (acc) => acc.connectorKey === ottRow.refId && accounts.map((item) => item.iban).includes(acc.iban)
1061
+ const alreadyExistingAccounts = (await this._getAccounts({
1062
+ filterIbans: accounts.map((item) => item.iban),
1063
+ limit: Number.MAX_SAFE_INTEGER
1064
+ })).accounts.filter(
1065
+ (acc) => acc.connectorKey === ottRow.refId
1063
1066
  );
1064
1067
  const upsertAccounts = accounts.map((acc) => {
1065
1068
  const existingAccount = alreadyExistingAccounts.find(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-services/bank",
3
- "version": "0.8.16",
3
+ "version": "0.8.17",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {