@pear-protocol/exchanges-sdk 0.19.1 → 0.20.0

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.
@@ -86,7 +86,7 @@ class BaseAccountSyncer {
86
86
  async computeAndPostSync(state, snapshot) {
87
87
  const { openPositions, entryBySymbol, provisionalFills, watermark } = state;
88
88
  const { exchangePositions, externalFills, firstSyncStartedAt } = snapshot;
89
- const payload = await computeSyncPayload({
89
+ let payload = await computeSyncPayload({
90
90
  tradeAccountId: this.account.id,
91
91
  connector: this.connector,
92
92
  openPositions,
@@ -98,7 +98,17 @@ class BaseAccountSyncer {
98
98
  neverSynced: watermark.neverSynced
99
99
  });
100
100
  if (!payload) {
101
- return;
101
+ if (watermark.hasPendingSynthetics !== true) {
102
+ return;
103
+ }
104
+ payload = {
105
+ applicables: [],
106
+ exchangePositions,
107
+ meta: {
108
+ externalMaxTs: null
109
+ },
110
+ firstSyncTrim: null
111
+ };
102
112
  }
103
113
  const { firstSyncTrim } = payload;
104
114
  let meta = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/exchanges-sdk",
3
- "version": "0.19.1",
3
+ "version": "0.20.0",
4
4
  "description": "Pear Protocol Exchanges SDK",
5
5
  "private": false,
6
6
  "type": "module",
@@ -22,15 +22,15 @@
22
22
  "scripts": {
23
23
  "build": "tsup",
24
24
  "clean": "rm -rf dist .turbo",
25
- "typecheck": "tsc --noEmit",
25
+ "typecheck": "bunx --package bun@1.4.3 bun --check --threads=2",
26
26
  "test": "vitest run",
27
27
  "test:watch": "vitest"
28
28
  },
29
29
  "dependencies": {
30
30
  "@nktkas/hyperliquid": "0.33.2",
31
- "@pear-protocol/core-sdk": "^2.12.0",
32
- "@pear-protocol/types": "^2.19.0",
33
- "@pear-protocol/utils": "^1.4.0",
31
+ "@pear-protocol/core-sdk": "^2.14.0",
32
+ "@pear-protocol/types": "^2.21.0",
33
+ "@pear-protocol/utils": "^1.5.0",
34
34
  "bignumber.js": "^11.1.1",
35
35
  "partysocket": "^1.0.3",
36
36
  "viem": "^2.48.8",