web3-banking-system-sdk 1.0.9 → 1.0.11

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,9 +12,11 @@ class PromotionService extends BaseService {
12
12
  req.baseURL = this.context.getNodeUrl();
13
13
  return req;
14
14
  }
15
- async onPromotionResponse(res) {
16
- const data = res?.data?.data;
17
- return { ...res, data };
15
+ // Node API wraps the payload in `data`; flatten it next to `result`.
16
+ onPromotionResponse(res) {
17
+ const { result, data } = res.data ?? {};
18
+ res.data = { result, ...data };
19
+ return res;
18
20
  }
19
21
  // #endregion
20
22
  // #region "GET"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web3-banking-system-sdk",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "TypeScript SDK used for interacting with the Web3 applications that uses Banking System API. ",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",