@rainprotocolsdk/sdk 2.1.0 → 2.1.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.
@@ -12,7 +12,8 @@ async function fetchExtendTimeSignature(oracleContractAddress, walletAddress, ac
12
12
  const res = await fetch(`${apiUrl}/pools/sign-oracles-extend-time?contractAddress=${oracleContractAddress}&walletAddress=${walletAddress}`, { headers: { Authorization: `Bearer ${accessToken}` } });
13
13
  if (!res.ok)
14
14
  throw new Error(`Failed to fetch extend time signature: ${res.status}`);
15
- const data = await res.json();
15
+ const json = await res.json();
16
+ const data = json?.data ?? json;
16
17
  if (!data?.epoch || !data?.signature)
17
18
  throw new Error("Invalid response from extend time signature endpoint");
18
19
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rainprotocolsdk/sdk",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "type": "module",
5
5
  "description": "Rain SDK",
6
6
  "main": "dist/index.js",