@cityofzion/bs-neo3 1.10.0 → 1.10.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.
@@ -1,4 +1,4 @@
1
- import { Account, GetLedgerTransport, LedgerService, LedgerServiceEmitter } from '@cityofzion/blockchain-service';
1
+ import { Account, GetLedgerTransport, LedgerService, LedgerServiceEmitter, UntilIndexRecord } from '@cityofzion/blockchain-service';
2
2
  import { api } from '@cityofzion/neon-js';
3
3
  import Transport from '@ledgerhq/hw-transport';
4
4
  import { BSNeo3 } from '../../BSNeo3';
@@ -8,6 +8,6 @@ export declare class NeonDappKitLedgerServiceNeo3<BSName extends string = string
8
8
  getLedgerTransport?: GetLedgerTransport<BSName>;
9
9
  constructor(blockchainService: BSNeo3<BSName>, getLedgerTransport?: GetLedgerTransport<BSName>);
10
10
  getAccount(transport: Transport, index: number): Promise<Account<BSName>>;
11
- getAccounts(transport: Transport, untilIndex?: number): Promise<Account<BSName>[]>;
11
+ getAccounts(transport: Transport, untilIndexByBlockchainService?: UntilIndexRecord<BSName>): Promise<Account<BSName>[]>;
12
12
  getSigningCallback(transport: Transport, account: Account): api.SigningFunction;
13
13
  }
@@ -68,19 +68,11 @@ class NeonDappKitLedgerServiceNeo3 {
68
68
  };
69
69
  });
70
70
  }
71
- getAccounts(transport, untilIndex) {
71
+ getAccounts(transport, untilIndexByBlockchainService) {
72
72
  return __awaiter(this, void 0, void 0, function* () {
73
- let accountsByBlockchainService;
74
- if (untilIndex === undefined) {
75
- accountsByBlockchainService = yield (0, blockchain_service_1.fetchAccountsForBlockchainServices)([__classPrivateFieldGet(this, _NeonDappKitLedgerServiceNeo3_blockchainService, "f")], (_service, index) => __awaiter(this, void 0, void 0, function* () {
76
- return this.getAccount(transport, index);
77
- }));
78
- }
79
- else {
80
- accountsByBlockchainService = yield (0, blockchain_service_1.generateAccountUntilIndexForBlockchainService)([__classPrivateFieldGet(this, _NeonDappKitLedgerServiceNeo3_blockchainService, "f")], untilIndex, (_service, index) => __awaiter(this, void 0, void 0, function* () {
81
- return this.getAccount(transport, index);
82
- }));
83
- }
73
+ const accountsByBlockchainService = yield (0, blockchain_service_1.generateAccountForBlockchainService)([__classPrivateFieldGet(this, _NeonDappKitLedgerServiceNeo3_blockchainService, "f")], (_service, index) => __awaiter(this, void 0, void 0, function* () {
74
+ return this.getAccount(transport, index);
75
+ }), untilIndexByBlockchainService);
84
76
  const accounts = accountsByBlockchainService.get(__classPrivateFieldGet(this, _NeonDappKitLedgerServiceNeo3_blockchainService, "f").name);
85
77
  return accounts !== null && accounts !== void 0 ? accounts : [];
86
78
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cityofzion/bs-neo3",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": "https://github.com/CityOfZion/blockchain-services",
@@ -20,7 +20,7 @@
20
20
  "bignumber.js": "^9.1.2",
21
21
  "isomorphic-ws": "^5.0.0",
22
22
  "lodash.clonedeep": "^4.5.0",
23
- "@cityofzion/blockchain-service": "1.15.0",
23
+ "@cityofzion/blockchain-service": "1.15.1",
24
24
  "@cityofzion/bs-asteroid-sdk": "0.9.0"
25
25
  },
26
26
  "devDependencies": {