dash-platform-sdk 1.3.2-dev.3 → 1.3.2-dev.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dash-platform-sdk",
3
- "version": "1.3.2-dev.3",
3
+ "version": "1.3.2-dev.4",
4
4
  "main": "index.js",
5
5
  "description": "Lightweight SDK for accessing Dash Platform blockchain",
6
6
  "ts-standard": {
@@ -39,7 +39,7 @@ export class DocumentsController {
39
39
  * @param startAfter {IdentifierLike=} Same as previous, but with exclusion. Cannot be set if startAt already provided
40
40
  */
41
41
  async query(dataContractId, documentType, where, orderBy, limit, startAt, startAfter) {
42
- if (startAfter != null && startAt !== null) {
42
+ if (startAfter != null && startAt != null) {
43
43
  throw new Error('You may only set either startAfter or startAt at once');
44
44
  }
45
45
  return await query(this.grpcPool, new IdentifierWASM(dataContractId), documentType, where, orderBy, limit ?? 100, startAt, startAfter);
@@ -7,9 +7,6 @@ import verifyTenderdashProof from '../utils/verifyTenderdashProof.js';
7
7
  import { encode } from 'cbor-x';
8
8
  import getDataContractByIdentifier from '../dataContracts/getDataContractByIdentifier.js';
9
9
  export default async function query(grpcPool, dataContractId, documentTypeName, where, orderBy, limit = 100, startAt, startAfter) {
10
- if ([startAt, startAfter].filter(e => e != null).length === 2) {
11
- throw new Error('Only startAt or startAfter could be specified at one time');
12
- }
13
10
  let start;
14
11
  if (startAt != null) {
15
12
  start = {