@ref-finance/ref-sdk 1.1.6 → 1.1.8

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.
@@ -1,12 +1,11 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('near-api-js'), require('bn.js'), require('fs'), require('os'), require('lodash-es'), require('mathjs'), require('big.js'), require('react'), require('@react-icons/all-files/fi/FiChevronDown'), require('@react-icons/all-files/fi/FiChevronLeft'), require('@react-icons/all-files/fi/FiChevronUp'), require('@react-icons/all-files/fa/FaSearch'), require('@react-icons/all-files/ri/RiRefreshLine'), require('@react-icons/all-files/ti/TiArrowSortedUp'), require('@react-icons/all-files/ti/TiArrowSortedDown'), require('@react-icons/all-files/hi/HiOutlineExternalLink'), require('@react-icons/all-files/ai/AiFillPushpin'), require('@react-icons/all-files/ai/AiOutlinePushpin'), require('@react-icons/all-files/ri/RiExchangeFill'), require('@react-icons/all-files/io5/IoWarning'), require('@react-icons/all-files/io5/IoCloseOutline'), require('@react-icons/all-files/ti/TiWarning'), require('@react-icons/all-files/cg/CgArrowsExchangeAltV')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'near-api-js', 'bn.js', 'fs', 'os', 'lodash-es', 'mathjs', 'big.js', 'react', '@react-icons/all-files/fi/FiChevronDown', '@react-icons/all-files/fi/FiChevronLeft', '@react-icons/all-files/fi/FiChevronUp', '@react-icons/all-files/fa/FaSearch', '@react-icons/all-files/ri/RiRefreshLine', '@react-icons/all-files/ti/TiArrowSortedUp', '@react-icons/all-files/ti/TiArrowSortedDown', '@react-icons/all-files/hi/HiOutlineExternalLink', '@react-icons/all-files/ai/AiFillPushpin', '@react-icons/all-files/ai/AiOutlinePushpin', '@react-icons/all-files/ri/RiExchangeFill', '@react-icons/all-files/io5/IoWarning', '@react-icons/all-files/io5/IoCloseOutline', '@react-icons/all-files/ti/TiWarning', '@react-icons/all-files/cg/CgArrowsExchangeAltV'], factory) :
4
- (global = global || self, factory(global['@ref-finance/ref-sdk'] = {}, global.nearApiJs, global.BN, global.fs, global.os, global._, global.math, global.Big, global.React, global.FiChevronDown, global.FiChevronLeft, global.FiChevronUp, global.FaSearch, global.RiRefreshLine, global.TiArrowSortedUp, global.TiArrowSortedDown, global.HiOutlineExternalLink, global.AiFillPushpin, global.AiOutlinePushpin, global.RiExchangeFill, global.IoWarning, global.IoCloseOutline, global.TiWarning, global.CgArrowsExchangeAltV));
5
- }(this, (function (exports, nearApiJs, BN, fs, os, _, math, Big, React, FiChevronDown, FiChevronLeft, FiChevronUp, FaSearch, RiRefreshLine, TiArrowSortedUp, TiArrowSortedDown, HiOutlineExternalLink, AiFillPushpin, AiOutlinePushpin, RiExchangeFill, IoWarning, IoCloseOutline, TiWarning, CgArrowsExchangeAltV) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('near-api-js'), require('bn.js'), require('fs'), require('lodash-es'), require('mathjs'), require('big.js'), require('react'), require('@react-icons/all-files/fi/FiChevronDown'), require('@react-icons/all-files/fi/FiChevronLeft'), require('@react-icons/all-files/fi/FiChevronUp'), require('@react-icons/all-files/fa/FaSearch'), require('@react-icons/all-files/ri/RiRefreshLine'), require('@react-icons/all-files/ti/TiArrowSortedUp'), require('@react-icons/all-files/ti/TiArrowSortedDown'), require('@react-icons/all-files/hi/HiOutlineExternalLink'), require('@react-icons/all-files/ai/AiFillPushpin'), require('@react-icons/all-files/ai/AiOutlinePushpin'), require('@react-icons/all-files/ri/RiExchangeFill'), require('@react-icons/all-files/io5/IoWarning'), require('@react-icons/all-files/io5/IoCloseOutline'), require('@react-icons/all-files/ti/TiWarning'), require('@react-icons/all-files/cg/CgArrowsExchangeAltV')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'near-api-js', 'bn.js', 'fs', 'lodash-es', 'mathjs', 'big.js', 'react', '@react-icons/all-files/fi/FiChevronDown', '@react-icons/all-files/fi/FiChevronLeft', '@react-icons/all-files/fi/FiChevronUp', '@react-icons/all-files/fa/FaSearch', '@react-icons/all-files/ri/RiRefreshLine', '@react-icons/all-files/ti/TiArrowSortedUp', '@react-icons/all-files/ti/TiArrowSortedDown', '@react-icons/all-files/hi/HiOutlineExternalLink', '@react-icons/all-files/ai/AiFillPushpin', '@react-icons/all-files/ai/AiOutlinePushpin', '@react-icons/all-files/ri/RiExchangeFill', '@react-icons/all-files/io5/IoWarning', '@react-icons/all-files/io5/IoCloseOutline', '@react-icons/all-files/ti/TiWarning', '@react-icons/all-files/cg/CgArrowsExchangeAltV'], factory) :
4
+ (global = global || self, factory(global['@ref-finance/ref-sdk'] = {}, global.nearApiJs, global.BN, global.fs, global._, global.math, global.Big, global.React, global.FiChevronDown, global.FiChevronLeft, global.FiChevronUp, global.FaSearch, global.RiRefreshLine, global.TiArrowSortedUp, global.TiArrowSortedDown, global.HiOutlineExternalLink, global.AiFillPushpin, global.AiOutlinePushpin, global.RiExchangeFill, global.IoWarning, global.IoCloseOutline, global.TiWarning, global.CgArrowsExchangeAltV));
5
+ }(this, (function (exports, nearApiJs, BN, fs, _, math, Big, React, FiChevronDown, FiChevronLeft, FiChevronUp, FaSearch, RiRefreshLine, TiArrowSortedUp, TiArrowSortedDown, HiOutlineExternalLink, AiFillPushpin, AiOutlinePushpin, RiExchangeFill, IoWarning, IoCloseOutline, TiWarning, CgArrowsExchangeAltV) { 'use strict';
6
6
 
7
7
  BN = BN && Object.prototype.hasOwnProperty.call(BN, 'default') ? BN['default'] : BN;
8
8
  fs = fs && Object.prototype.hasOwnProperty.call(fs, 'default') ? fs['default'] : fs;
9
- os = os && Object.prototype.hasOwnProperty.call(os, 'default') ? os['default'] : os;
10
9
  var ___default = 'default' in _ ? _['default'] : _;
11
10
  Big = Big && Object.prototype.hasOwnProperty.call(Big, 'default') ? Big['default'] : Big;
12
11
  var React__default = 'default' in React ? React['default'] : React;
@@ -33,7 +32,7 @@
33
32
  REF_TOKEN_ID: 'token.v2.ref-finance.near',
34
33
  indexerUrl: 'https://indexer.ref.finance',
35
34
  explorerUrl: 'https://testnet.nearblocks.io',
36
- REF_DCL_SWAP_CONTRACT_ID: ''
35
+ REF_DCL_SWAP_CONTRACT_ID: 'dcl.ref-labs.near'
37
36
  };
38
37
  case 'testnet':
39
38
  return {
@@ -45,7 +44,7 @@
45
44
  REF_FI_CONTRACT_ID: 'ref-finance-101.testnet',
46
45
  REF_TOKEN_ID: 'ref.fakes.testnet',
47
46
  explorerUrl: 'https://testnet.nearblocks.io',
48
- REF_DCL_SWAP_CONTRACT_ID: 'dcl.ref-dev.testnet'
47
+ REF_DCL_SWAP_CONTRACT_ID: 'dclv1.ref-dev.testnet'
49
48
  };
50
49
  default:
51
50
  return {
@@ -57,7 +56,7 @@
57
56
  REF_TOKEN_ID: 'token.v2.ref-finance.near',
58
57
  indexerUrl: 'https://indexer.ref.finance',
59
58
  explorerUrl: 'https://nearblocks.io',
60
- REF_DCL_SWAP_CONTRACT_ID: ''
59
+ REF_DCL_SWAP_CONTRACT_ID: 'dcl.ref-labs.near'
61
60
  };
62
61
  }
63
62
  }
@@ -3642,42 +3641,42 @@
3642
3641
  });
3643
3642
  var getMemorySigner = /*#__PURE__*/function () {
3644
3643
  var _ref2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
3645
- var AccountId, keyPath, homedir, credentials, credentialAccountId, myKeyStore, signer;
3644
+ var AccountId, keyPath, credentials, credentialAccountId, myKeyStore, signer;
3646
3645
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3647
3646
  while (1) {
3648
3647
  switch (_context.prev = _context.next) {
3649
3648
  case 0:
3650
3649
  AccountId = _ref.AccountId, keyPath = _ref.keyPath;
3651
3650
  _context.prev = 1;
3652
- homedir = os.homedir();
3653
- credentials = JSON.parse(fs.readFileSync(homedir + keyPath).toString());
3651
+ // const homedir = os.homedir();
3652
+ credentials = JSON.parse(fs.readFileSync(keyPath).toString());
3654
3653
  credentialAccountId = credentials == null ? void 0 : credentials.account_id;
3655
3654
  if (credentialAccountId) {
3656
- _context.next = 7;
3655
+ _context.next = 6;
3657
3656
  break;
3658
3657
  }
3659
3658
  throw NoCredential;
3660
- case 7:
3659
+ case 6:
3661
3660
  if (!(credentialAccountId !== AccountId)) {
3662
- _context.next = 9;
3661
+ _context.next = 8;
3663
3662
  break;
3664
3663
  }
3665
3664
  throw AccountIdMisMatch;
3666
- case 9:
3665
+ case 8:
3667
3666
  myKeyStore = new nearApiJs.keyStores.InMemoryKeyStore();
3668
3667
  myKeyStore.setKey(getConfig().networkId, AccountId, nearApiJs.KeyPair.fromString(credentials.private_key));
3669
3668
  signer = new nearApiJs.InMemorySigner(myKeyStore);
3670
3669
  return _context.abrupt("return", signer);
3671
- case 15:
3672
- _context.prev = 15;
3670
+ case 14:
3671
+ _context.prev = 14;
3673
3672
  _context.t0 = _context["catch"](1);
3674
3673
  throw _context.t0;
3675
- case 18:
3674
+ case 17:
3676
3675
  case "end":
3677
3676
  return _context.stop();
3678
3677
  }
3679
3678
  }
3680
- }, _callee, null, [[1, 15]]);
3679
+ }, _callee, null, [[1, 14]]);
3681
3680
  }));
3682
3681
  return function getMemorySigner(_x) {
3683
3682
  return _ref2.apply(this, arguments);
@@ -3989,7 +3988,7 @@
3989
3988
  return ftViewFunction(id, {
3990
3989
  methodName: 'ft_metadata'
3991
3990
  })["catch"](function () {
3992
- throw TokenNotExistError;
3991
+ throw TokenNotExistError(id);
3993
3992
  });
3994
3993
  case 4:
3995
3994
  metadata = _context5.sent;
@@ -4018,22 +4017,35 @@
4018
4017
  }();
4019
4018
  var ftGetTokensMetadata = /*#__PURE__*/function () {
4020
4019
  var _ref8 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(tokenIds, allTokens) {
4021
- var tokensMetadata;
4020
+ var ids, tokensMetadata;
4022
4021
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
4023
4022
  while (1) {
4024
4023
  switch (_context6.prev = _context6.next) {
4025
4024
  case 0:
4026
- _context6.next = 2;
4027
- return Promise.all(tokenIds.map(function (id) {
4028
- return allTokens[id] || ftGetTokenMetadata(id);
4025
+ _context6.t0 = tokenIds;
4026
+ if (_context6.t0) {
4027
+ _context6.next = 5;
4028
+ break;
4029
+ }
4030
+ _context6.next = 4;
4031
+ return getGlobalWhitelist();
4032
+ case 4:
4033
+ _context6.t0 = _context6.sent;
4034
+ case 5:
4035
+ ids = _context6.t0;
4036
+ _context6.next = 8;
4037
+ return Promise.all(ids.map(function (id) {
4038
+ return (allTokens == null ? void 0 : allTokens[id]) || ftGetTokenMetadata(id)["catch"](function () {
4039
+ return null;
4040
+ });
4029
4041
  }));
4030
- case 2:
4042
+ case 8:
4031
4043
  tokensMetadata = _context6.sent;
4032
4044
  return _context6.abrupt("return", tokensMetadata.reduce(function (pre, cur, i) {
4033
4045
  var _extends2;
4034
- return _extends({}, pre, (_extends2 = {}, _extends2[tokenIds[i]] = cur, _extends2));
4046
+ return _extends({}, pre, (_extends2 = {}, _extends2[ids[i]] = cur, _extends2));
4035
4047
  }, {}));
4036
- case 4:
4048
+ case 10:
4037
4049
  case "end":
4038
4050
  return _context6.stop();
4039
4051
  }
@@ -4238,7 +4250,9 @@
4238
4250
  var NoPoolError = /*#__PURE__*/formatError('No pool found for the input tokens');
4239
4251
  var NotLoginError = /*#__PURE__*/formatError('Please login in first');
4240
4252
  var SwapRouteError = /*#__PURE__*/formatError("Something wrong happened, we don't get correct routes corrreponding to current input");
4241
- var TokenNotExistError = /*#__PURE__*/formatError("This token doesn't exist in " + /*#__PURE__*/getConfig().networkId);
4253
+ var TokenNotExistError = function TokenNotExistError(id) {
4254
+ return formatError(id + " doesn't exist in " + getConfig().networkId);
4255
+ };
4242
4256
  var NoPuiblicKeyError = /*#__PURE__*/formatError('No public key found');
4243
4257
  var NoLocalSignerError = /*#__PURE__*/formatError('No local signer found');
4244
4258
  var InValidAccessKeyError = /*#__PURE__*/formatError('Invalid access key');
@@ -4261,12 +4275,12 @@
4261
4275
  var instantSwap = /*#__PURE__*/function () {
4262
4276
  var _ref2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref) {
4263
4277
  var _swapTodos;
4264
- var tokenIn, tokenOut, amountIn, slippageTolerance, swapTodos, AccountId, transactions, registerToken, registered, actionsList, allSwapsTokens, i, swapTokens;
4278
+ var tokenIn, tokenOut, amountIn, slippageTolerance, swapTodos, AccountId, referralId, transactions, registerToken, registered, actionsList, allSwapsTokens, i, swapTokens;
4265
4279
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
4266
4280
  while (1) {
4267
4281
  switch (_context2.prev = _context2.next) {
4268
4282
  case 0:
4269
- tokenIn = _ref.tokenIn, tokenOut = _ref.tokenOut, amountIn = _ref.amountIn, slippageTolerance = _ref.slippageTolerance, swapTodos = _ref.swapTodos, AccountId = _ref.AccountId;
4283
+ tokenIn = _ref.tokenIn, tokenOut = _ref.tokenOut, amountIn = _ref.amountIn, slippageTolerance = _ref.slippageTolerance, swapTodos = _ref.swapTodos, AccountId = _ref.AccountId, referralId = _ref.referralId;
4270
4284
  transactions = [];
4271
4285
  if (!((swapTodos == null ? void 0 : (_swapTodos = swapTodos[(swapTodos == null ? void 0 : swapTodos.length) - 1]) == null ? void 0 : _swapTodos.outputToken) !== tokenOut.id)) {
4272
4286
  _context2.next = 4;
@@ -4373,7 +4387,11 @@
4373
4387
  args: {
4374
4388
  receiver_id: exports.REF_FI_CONTRACT_ID,
4375
4389
  amount: toNonDivisibleNumber(tokenIn.decimals, amountIn),
4376
- msg: JSON.stringify({
4390
+ msg: !!referralId ? JSON.stringify({
4391
+ force: 0,
4392
+ actions: actionsList,
4393
+ referral_id: referralId
4394
+ }) : JSON.stringify({
4377
4395
  force: 0,
4378
4396
  actions: actionsList
4379
4397
  })
@@ -4511,12 +4529,42 @@
4511
4529
  return _ref6.apply(this, arguments);
4512
4530
  };
4513
4531
  }();
4514
- var getRefPools = /*#__PURE__*/function () {
4515
- var _ref7 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(page, perPage) {
4516
- var index, poolData;
4532
+ var getPoolByIds = /*#__PURE__*/function () {
4533
+ var _ref7 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(ids) {
4517
4534
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
4518
4535
  while (1) {
4519
4536
  switch (_context5.prev = _context5.next) {
4537
+ case 0:
4538
+ _context5.next = 2;
4539
+ return refFiViewFunction({
4540
+ methodName: 'get_pool_by_ids',
4541
+ args: {
4542
+ pool_ids: ids
4543
+ }
4544
+ }).then(function (pools) {
4545
+ return pools.map(function (p, i) {
4546
+ return parsePool(p, ids[i]);
4547
+ });
4548
+ });
4549
+ case 2:
4550
+ return _context5.abrupt("return", _context5.sent);
4551
+ case 3:
4552
+ case "end":
4553
+ return _context5.stop();
4554
+ }
4555
+ }
4556
+ }, _callee5);
4557
+ }));
4558
+ return function getPoolByIds(_x5) {
4559
+ return _ref7.apply(this, arguments);
4560
+ };
4561
+ }();
4562
+ var getRefPools = /*#__PURE__*/function () {
4563
+ var _ref8 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(page, perPage) {
4564
+ var index, poolData;
4565
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
4566
+ while (1) {
4567
+ switch (_context6.prev = _context6.next) {
4520
4568
  case 0:
4521
4569
  if (page === void 0) {
4522
4570
  page = 1;
@@ -4525,7 +4573,7 @@
4525
4573
  perPage = DEFAULT_PAGE_LIMIT;
4526
4574
  }
4527
4575
  index = (page - 1) * perPage;
4528
- _context5.next = 5;
4576
+ _context6.next = 5;
4529
4577
  return refFiViewFunction({
4530
4578
  methodName: 'get_pools',
4531
4579
  args: {
@@ -4534,43 +4582,43 @@
4534
4582
  }
4535
4583
  });
4536
4584
  case 5:
4537
- poolData = _context5.sent;
4538
- return _context5.abrupt("return", poolData.map(function (rawPool, i) {
4585
+ poolData = _context6.sent;
4586
+ return _context6.abrupt("return", poolData.map(function (rawPool, i) {
4539
4587
  return parsePool(rawPool, i + index);
4540
4588
  }));
4541
4589
  case 7:
4542
4590
  case "end":
4543
- return _context5.stop();
4591
+ return _context6.stop();
4544
4592
  }
4545
4593
  }
4546
- }, _callee5);
4594
+ }, _callee6);
4547
4595
  }));
4548
- return function getRefPools(_x5, _x6) {
4549
- return _ref7.apply(this, arguments);
4596
+ return function getRefPools(_x6, _x7) {
4597
+ return _ref8.apply(this, arguments);
4550
4598
  };
4551
4599
  }();
4552
4600
  var fetchAllPools = /*#__PURE__*/function () {
4553
- var _ref8 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(perPage) {
4601
+ var _ref9 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(perPage) {
4554
4602
  var totalPools, pages, pools;
4555
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
4603
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
4556
4604
  while (1) {
4557
- switch (_context6.prev = _context6.next) {
4605
+ switch (_context7.prev = _context7.next) {
4558
4606
  case 0:
4559
4607
  if (perPage) {
4560
4608
  DEFAULT_PAGE_LIMIT = Math.min(perPage, 500);
4561
4609
  }
4562
- _context6.next = 3;
4610
+ _context7.next = 3;
4563
4611
  return getTotalPools();
4564
4612
  case 3:
4565
- totalPools = _context6.sent;
4613
+ totalPools = _context7.sent;
4566
4614
  pages = Math.ceil(totalPools / DEFAULT_PAGE_LIMIT);
4567
- _context6.next = 7;
4615
+ _context7.next = 7;
4568
4616
  return Promise.all([].concat(Array(pages)).fill(0).map(function (_, i) {
4569
4617
  return getRefPools(i + 1);
4570
4618
  }));
4571
4619
  case 7:
4572
- pools = _context6.sent.flat();
4573
- return _context6.abrupt("return", {
4620
+ pools = _context7.sent.flat();
4621
+ return _context7.abrupt("return", {
4574
4622
  simplePools: pools.filter(function (p) {
4575
4623
  return p.pool_kind && p.pool_kind === 'SIMPLE_POOL';
4576
4624
  }),
@@ -4583,17 +4631,17 @@
4583
4631
  });
4584
4632
  case 9:
4585
4633
  case "end":
4586
- return _context6.stop();
4634
+ return _context7.stop();
4587
4635
  }
4588
4636
  }
4589
- }, _callee6);
4637
+ }, _callee7);
4590
4638
  }));
4591
- return function fetchAllPools(_x7) {
4592
- return _ref8.apply(this, arguments);
4639
+ return function fetchAllPools(_x8) {
4640
+ return _ref9.apply(this, arguments);
4593
4641
  };
4594
4642
  }();
4595
4643
 
4596
- var _excluded = ["slippageTolerance", "refreshTrigger", "onSwap", "AccountId", "poolFetchingState"];
4644
+ var _excluded = ["slippageTolerance", "refreshTrigger", "onSwap", "AccountId", "poolFetchingState", "referralId"];
4597
4645
  var ThemeContext = /*#__PURE__*/React.createContext(defaultTheme);
4598
4646
  var ThemeContextProvider = function ThemeContextProvider(_ref) {
4599
4647
  var customTheme = _ref.customTheme,
@@ -4771,6 +4819,7 @@
4771
4819
  onSwap = params.onSwap,
4772
4820
  AccountId = params.AccountId,
4773
4821
  poolFetchingState = params.poolFetchingState,
4822
+ referralId = params.referralId,
4774
4823
  swapParams = _objectWithoutPropertiesLoose(params, _excluded);
4775
4824
  var tokenIn = params.tokenIn,
4776
4825
  tokenOut = params.tokenOut,
@@ -4816,7 +4865,8 @@
4816
4865
  amountIn: params.amountIn,
4817
4866
  swapTodos: estimates,
4818
4867
  slippageTolerance: slippageTolerance,
4819
- AccountId: AccountId || ''
4868
+ AccountId: AccountId || '',
4869
+ referralId: referralId
4820
4870
  });
4821
4871
  case 4:
4822
4872
  transactionsRef = _context3.sent;
@@ -6227,7 +6277,8 @@
6227
6277
  defaultTokenIn = props.defaultTokenIn,
6228
6278
  defaultTokenOut = props.defaultTokenOut,
6229
6279
  onDisConnect = props.onDisConnect,
6230
- darkMode = props.darkMode;
6280
+ darkMode = props.darkMode,
6281
+ referralId = props.referralId;
6231
6282
  var curTheme = theme || (darkMode ? defaultDarkModeTheme : defaultTheme);
6232
6283
  var STORAGED_TOKEN_IN = localStorage.getItem(REF_WIDGET_SWAP_IN_KEY);
6233
6284
  var STORAGED_TOKEN_OUT = localStorage.getItem(REF_WIDGET_SWAP_OUT_KEY);
@@ -6380,7 +6431,8 @@
6380
6431
  onSwap: onSwap,
6381
6432
  AccountId: AccountId,
6382
6433
  refreshTrigger: refreshTrigger,
6383
- poolFetchingState: poolFetchingState
6434
+ poolFetchingState: poolFetchingState,
6435
+ referralId: referralId
6384
6436
  }),
6385
6437
  amountOut = _useSwap.amountOut,
6386
6438
  minAmountOut = _useSwap.minAmountOut,
@@ -8014,6 +8066,7 @@
8014
8066
  exports.getPointByPrice = getPointByPrice;
8015
8067
  exports.getPool = getPool;
8016
8068
  exports.getPoolAllocationPercents = getPoolAllocationPercents;
8069
+ exports.getPoolByIds = getPoolByIds;
8017
8070
  exports.getPoolEstimate = getPoolEstimate;
8018
8071
  exports.getPoolsByTokens = getPoolsByTokens;
8019
8072
  exports.getPriceImpact = getPriceImpact;