@ref-finance/ref-sdk 1.3.3 → 1.3.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.
@@ -28,11 +28,16 @@ var RATED_POOL_LP_TOKEN_DECIMALS = 24;
28
28
  var STORAGE_TO_REGISTER_WITH_MFT = '0.1';
29
29
  var ONE_YOCTO_NEAR = '0.000000000000000000000001';
30
30
  var ENV = '';
31
- function getConfig(env) {
31
+ var INDEXER_URL = '';
32
+ function getConfig(env, indexerUrl) {
32
33
  if (env === void 0) {
33
34
  env = ENV || process.env.NEAR_ENV || process.env.REACT_APP_REF_SDK_ENV;
34
35
  }
36
+ if (indexerUrl === void 0) {
37
+ indexerUrl = INDEXER_URL;
38
+ }
35
39
  ENV = env;
40
+ INDEXER_URL = indexerUrl;
36
41
  switch (env) {
37
42
  case 'mainnet':
38
43
  return {
@@ -42,7 +47,7 @@ function getConfig(env) {
42
47
  WRAP_NEAR_CONTRACT_ID: 'wrap.near',
43
48
  REF_FI_CONTRACT_ID: 'v2.ref-finance.near',
44
49
  REF_TOKEN_ID: 'token.v2.ref-finance.near',
45
- indexerUrl: 'https://indexer.ref.finance',
50
+ indexerUrl: indexerUrl || 'https://indexer.ref.finance',
46
51
  explorerUrl: 'https://testnet.nearblocks.io',
47
52
  REF_DCL_SWAP_CONTRACT_ID: 'dclv2.ref-labs.near'
48
53
  };
@@ -51,7 +56,7 @@ function getConfig(env) {
51
56
  networkId: 'testnet',
52
57
  nodeUrl: 'https://rpc.testnet.near.org',
53
58
  walletUrl: 'https://wallet.testnet.near.org',
54
- indexerUrl: 'https://testnet-indexer.ref-finance.com',
59
+ indexerUrl: indexerUrl || 'https://testnet-indexer.ref-finance.com',
55
60
  WRAP_NEAR_CONTRACT_ID: 'wrap.testnet',
56
61
  REF_FI_CONTRACT_ID: 'ref-finance-101.testnet',
57
62
  REF_TOKEN_ID: 'ref.fakes.testnet',
@@ -66,7 +71,7 @@ function getConfig(env) {
66
71
  REF_FI_CONTRACT_ID: 'v2.ref-finance.near',
67
72
  WRAP_NEAR_CONTRACT_ID: 'wrap.near',
68
73
  REF_TOKEN_ID: 'token.v2.ref-finance.near',
69
- indexerUrl: 'https://indexer.ref.finance',
74
+ indexerUrl: indexerUrl || 'https://indexer.ref.finance',
70
75
  explorerUrl: 'https://nearblocks.io',
71
76
  REF_DCL_SWAP_CONTRACT_ID: 'dclv2.ref-labs.near'
72
77
  };
@@ -3912,11 +3917,11 @@ var near = /*#__PURE__*/new Near( /*#__PURE__*/_extends({
3912
3917
  keyStore: /*#__PURE__*/getKeyStore(),
3913
3918
  headers: {}
3914
3919
  }, /*#__PURE__*/getConfig()));
3915
- var init_env = function init_env(env) {
3920
+ var init_env = function init_env(env, indexerUrl) {
3916
3921
  near = new Near(_extends({
3917
3922
  keyStore: getKeyStore(),
3918
3923
  headers: {}
3919
- }, getConfig(env)));
3924
+ }, getConfig(env, indexerUrl)));
3920
3925
  return switchEnv();
3921
3926
  };
3922
3927
  var refFiViewFunction = /*#__PURE__*/function () {
@@ -7556,6 +7561,24 @@ var DefaultMainnetTokenList = [{
7556
7561
  reference_hash: null,
7557
7562
  decimals: 6,
7558
7563
  id: 'usdt.tether-token.near'
7564
+ }, {
7565
+ spec: 'ft-1.0.0',
7566
+ name: 'NEAT',
7567
+ symbol: 'NEAT',
7568
+ icon: "data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='40' height='40' rx='4.8' fill='%23202020'/%3E%3Crect width='40' height='40' rx='4.8' fill='url(%23paint0_linear_1_5571)'/%3E%3Crect x='10.4' y='12.6001' width='4.8' height='4.8' fill='white'/%3E%3Crect x='15.2' y='12.6001' width='4.8' height='4.8' fill='white'/%3E%3Crect x='24.8' y='12.6001' width='4.8' height='4.8' fill='white'/%3E%3Crect x='10.4' y='17.4001' width='4.8' height='4.8' fill='white'/%3E%3Crect x='24.8' y='17.4001' width='4.8' height='4.8' fill='white'/%3E%3Crect x='10.4' y='22.2002' width='4.8' height='4.8' fill='white'/%3E%3Crect x='24.8' y='22.2002' width='4.8' height='4.8' fill='white'/%3E%3Crect x='20' y='22.2002' width='4.8' height='4.8' fill='white'/%3E%3Crect x='17.6' y='17.4001' width='4.8' height='4.8' fill='white'/%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear_1_5571' x1='20' y1='0' x2='20' y2='40' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23262626'/%3E%3Cstop offset='1' stop-color='%23121212'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E%0A",
7569
+ reference: null,
7570
+ reference_hash: null,
7571
+ decimals: 8,
7572
+ id: 'neat.nrc-20.near'
7573
+ }, {
7574
+ spec: 'ft-1.0.0',
7575
+ name: 'USMeme',
7576
+ symbol: 'USM',
7577
+ icon: 'https://storage.herewallet.app/upload/13151331-8f9c-4851-8038-36794688c693.jpg',
7578
+ reference: null,
7579
+ reference_hash: null,
7580
+ decimals: 8,
7581
+ id: 'usmeme.tg'
7559
7582
  }];
7560
7583
  function getDefaultTokenList() {
7561
7584
  var env = getConfig().networkId;