@aurigami/sdk 1.4.3 → 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 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,33 +1032,22 @@ function _getQuery() {
1033
1032
  params = {};
1034
1033
  }
1035
1034
 
1036
- if (!globalThis.fetch) {
1037
- Object.assign(globalThis, {
1038
- fetch: fetch
1039
- });
1040
- }
1041
-
1042
1035
  params = _extends({}, params, {
1043
1036
  'module': module,
1044
1037
  'action': action
1045
1038
  });
1046
- _context.next = 5;
1047
- 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), {
1048
1041
  headers: {
1049
1042
  'Content-Type': 'application/json'
1050
- },
1051
- method: 'GET'
1043
+ }
1052
1044
  });
1053
1045
 
1054
- case 5:
1046
+ case 4:
1055
1047
  resp = _context.sent;
1056
- _context.next = 8;
1057
- return resp.json();
1058
-
1059
- case 8:
1060
- return _context.abrupt("return", _context.sent.result);
1048
+ return _context.abrupt("return", resp.data.result);
1061
1049
 
1062
- case 9:
1050
+ case 6:
1063
1051
  case "end":
1064
1052
  return _context.stop();
1065
1053
  }