@aurigami/sdk 1.4.4 → 1.4.5

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/dist/sdk.esm.js CHANGED
@@ -2,13 +2,12 @@ import BigNumber from 'bignumber.js';
2
2
  import { BigNumber as BigNumber$1, utils, Contract, ethers } from 'ethers';
3
3
  import { Logger } from 'ethers/lib/utils';
4
4
  import { Signer } from '@ethersproject/abstract-signer';
5
- import fetch, { Headers, Request, Response } from 'node-fetch';
5
+ import axios from 'axios';
6
6
  import AuErc20ABI from '@aurigami/contracts/artifacts/contracts/AuErc20.sol/AuErc20.json';
7
7
  import AuETHABI from '@aurigami/contracts/artifacts/contracts/AuETH.sol/AuETH.json';
8
8
  import ComptrollerABI from '@aurigami/contracts/artifacts/contracts/Comptroller.sol/Comptroller.json';
9
9
  import AuriLensABI from '@aurigami/contracts/artifacts/contracts/AuriLens.sol/AuriLens.json';
10
10
  import EthRepayHelperABI from '@aurigami/contracts/artifacts/contracts/EthRepayHelper.sol/EthRepayHelper.json';
11
- import axios from 'axios';
12
11
  import TokenLockABI from '@aurigami/contracts/artifacts/contracts/TokenLock.sol/TokenLock.json';
13
12
  import AuriFairLaunchABI from '@aurigami/contracts/artifacts/contracts/AuriFairLaunch.sol/AuriFairLaunch.json';
14
13
  import FaucetABI from '@aurigami/contracts/artifacts/contracts/mock/Faucet.sol/Faucet.json';
@@ -1033,36 +1032,22 @@ function _getQuery() {
1033
1032
  params = {};
1034
1033
  }
1035
1034
 
1036
- if (!globalThis.fetch) {
1037
- Object.assign(globalThis, {
1038
- fetch: fetch,
1039
- Headers: Headers,
1040
- Request: Request,
1041
- Response: Response
1042
- });
1043
- }
1044
-
1045
1035
  params = _extends({}, params, {
1046
1036
  'module': module,
1047
1037
  'action': action
1048
1038
  });
1049
- _context.next = 5;
1050
- return globalThis.fetch(AURORA_API_BASE_URL + '?' + new URLSearchParams(params), {
1039
+ _context.next = 4;
1040
+ return axios.get(AURORA_API_BASE_URL + '?' + new URLSearchParams(params), {
1051
1041
  headers: {
1052
1042
  'Content-Type': 'application/json'
1053
- },
1054
- method: 'GET'
1043
+ }
1055
1044
  });
1056
1045
 
1057
- case 5:
1046
+ case 4:
1058
1047
  resp = _context.sent;
1059
- _context.next = 8;
1060
- return resp.json();
1061
-
1062
- case 8:
1063
- return _context.abrupt("return", _context.sent.result);
1048
+ return _context.abrupt("return", resp.data.result);
1064
1049
 
1065
- case 9:
1050
+ case 6:
1066
1051
  case "end":
1067
1052
  return _context.stop();
1068
1053
  }