@gearbox-protocol/sdk 14.12.0-next.18 → 14.12.0-next.19

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.
@@ -198,12 +198,7 @@ function toWithdrawableAsset(a, creditManager) {
198
198
  }
199
199
  function toClaimableWithdrawal(w, creditManager, decodeIntent) {
200
200
  let intent;
201
- if (decodeIntent) {
202
- if (!w.extraData || w.extraData === "0x") {
203
- throw new Error(
204
- `claimable withdrawal of ${w.token} has no delayed intent in extraData`
205
- );
206
- }
201
+ if (decodeIntent && w.extraData && w.extraData !== "0x") {
207
202
  intent = { ...(0, import_intent.decodeDelayedIntent)(w.extraData), creditManager };
208
203
  }
209
204
  return {
@@ -175,12 +175,7 @@ function toWithdrawableAsset(a, creditManager) {
175
175
  }
176
176
  function toClaimableWithdrawal(w, creditManager, decodeIntent) {
177
177
  let intent;
178
- if (decodeIntent) {
179
- if (!w.extraData || w.extraData === "0x") {
180
- throw new Error(
181
- `claimable withdrawal of ${w.token} has no delayed intent in extraData`
182
- );
183
- }
178
+ if (decodeIntent && w.extraData && w.extraData !== "0x") {
184
179
  intent = { ...decodeDelayedIntent(w.extraData), creditManager };
185
180
  }
186
181
  return {
@@ -57,8 +57,8 @@ export interface ClaimableWithdrawal {
57
57
  /**
58
58
  * Delayed intent decoded from the withdrawal's `extraData`, enriched with
59
59
  * the credit manager of the credit account. `undefined` on compressor
60
- * versions below 313; always present on v313+ (reading claimable
61
- * withdrawals throws if `extraData` cannot be decoded).
60
+ * versions below 313, and on v313+ when the withdrawal was requested
61
+ * without an intent (empty `extraData`).
62
62
  **/
63
63
  intent?: DelayedIntentExtended;
64
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "14.12.0-next.18",
3
+ "version": "14.12.0-next.19",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "repository": {