|
| 1 | +diff --git a/dist/assetsUtil.cjs b/dist/assetsUtil.cjs |
| 2 | +index 48571b8c1b78e94d88e1837e986b5f8735ac651b..61246f51500c8cab48f18296a73629fb73454caa 100644 |
| 3 | +--- a/dist/assetsUtil.cjs |
| 4 | ++++ b/dist/assetsUtil.cjs |
| 5 | +@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { |
| 6 | + return (mod && mod.__esModule) ? mod : { "default": mod }; |
| 7 | + }; |
| 8 | + Object.defineProperty(exports, "__esModule", { value: true }); |
| 9 | ++function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } |
| 10 | + exports.fetchTokenContractExchangeRates = exports.reduceInBatchesSerially = exports.divideIntoBatches = exports.ethersBigNumberToBN = exports.addUrlProtocolPrefix = exports.getFormattedIpfsUrl = exports.getIpfsCIDv1AndPath = exports.removeIpfsProtocolPrefix = exports.isTokenListSupportedForNetwork = exports.isTokenDetectionSupportedForNetwork = exports.SupportedStakedBalanceNetworks = exports.SupportedTokenDetectionNetworks = exports.formatIconUrlWithProxy = exports.formatAggregatorNames = exports.hasNewCollectionFields = exports.compareNftMetadata = exports.TOKEN_PRICES_BATCH_SIZE = void 0; |
| 11 | + const controller_utils_1 = require("@metamask/controller-utils"); |
| 12 | + const utils_1 = require("@metamask/utils"); |
| 13 | +@@ -233,7 +234,7 @@ async function getIpfsCIDv1AndPath(ipfsUrl) { |
| 14 | + const index = url.indexOf('/'); |
| 15 | + const cid = index !== -1 ? url.substring(0, index) : url; |
| 16 | + const path = index !== -1 ? url.substring(index) : undefined; |
| 17 | +- const { CID } = await import("multiformats"); |
| 18 | ++ const { CID } = _interopRequireWildcard(require("multiformats")); |
| 19 | + // We want to ensure that the CID is v1 (https://docs.ipfs.io/concepts/content-addressing/#identifier-formats) |
| 20 | + // because most cid v0s appear to be incompatible with IPFS subdomains |
| 21 | + return { |
| 22 | +diff --git a/dist/token-prices-service/codefi-v2.mjs b/dist/token-prices-service/codefi-v2.mjs |
| 23 | +index e7eaad2cfa8b233c4fd42a51f745233a1cc5c387..bf8ec7819f678c2f185d6a85d7e3ea81f055a309 100644 |
| 24 | +--- a/dist/token-prices-service/codefi-v2.mjs |
| 25 | ++++ b/dist/token-prices-service/codefi-v2.mjs |
| 26 | +@@ -12,8 +12,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function ( |
| 27 | + var _CodefiTokenPricesServiceV2_tokenPricePolicy; |
| 28 | + import { handleFetch } from "@metamask/controller-utils"; |
| 29 | + import { hexToNumber } from "@metamask/utils"; |
| 30 | +-import $cockatiel from "cockatiel"; |
| 31 | +-const { circuitBreaker, ConsecutiveBreaker, ExponentialBackoff, handleAll, retry, wrap, CircuitState } = $cockatiel; |
| 32 | ++import { circuitBreaker, ConsecutiveBreaker, ExponentialBackoff, handleAll, retry, wrap, CircuitState } from "cockatiel" |
| 33 | + /** |
| 34 | + * The list of currencies that can be supplied as the `vsCurrency` parameter to |
| 35 | + * the `/spot-prices` endpoint, in lowercase form. |
| 36 | +diff --git a/dist/TokenDetectionController.cjs b/dist/TokenDetectionController.cjs |
| 37 | +index 8fd5efde7a3c24080f8a43f79d10300e8c271245..a3c334ac7dd2e5698e6b54a73491b7145c2a9010 100644 |
| 38 | +--- a/dist/TokenDetectionController.cjs |
| 39 | ++++ b/dist/TokenDetectionController.cjs |
| 40 | +@@ -250,17 +250,20 @@ _TokenDetectionController_intervalId = new WeakMap(), _TokenDetectionController_ |
| 41 | + } |
| 42 | + }); |
| 43 | + this.messagingSystem.subscribe('AccountsController:selectedEvmAccountChange', |
| 44 | +- // TODO: Either fix this lint violation or explain why it's necessary to ignore. |
| 45 | +- // eslint-disable-next-line @typescript-eslint/no-misused-promises |
| 46 | +- async (selectedAccount) => { |
| 47 | +- const isSelectedAccountIdChanged = __classPrivateFieldGet(this, _TokenDetectionController_selectedAccountId, "f") !== selectedAccount.id; |
| 48 | +- if (isSelectedAccountIdChanged) { |
| 49 | +- __classPrivateFieldSet(this, _TokenDetectionController_selectedAccountId, selectedAccount.id, "f"); |
| 50 | +- await __classPrivateFieldGet(this, _TokenDetectionController_instances, "m", _TokenDetectionController_restartTokenDetection).call(this, { |
| 51 | +- selectedAddress: selectedAccount.address, |
| 52 | +- }); |
| 53 | +- } |
| 54 | +- }); |
| 55 | ++ // TODO: Either fix this lint violation or explain why it's necessary to ignore. |
| 56 | ++ // eslint-disable-next-line @typescript-eslint/no-misused-promises |
| 57 | ++ async (selectedAccount) => { |
| 58 | ++ const { networkConfigurationsByChainId } = this.messagingSystem.call('NetworkController:getState'); |
| 59 | ++ const chainIds = Object.keys(networkConfigurationsByChainId); |
| 60 | ++ const isSelectedAccountIdChanged = __classPrivateFieldGet(this, _TokenDetectionController_selectedAccountId, "f") !== selectedAccount.id; |
| 61 | ++ if (isSelectedAccountIdChanged) { |
| 62 | ++ __classPrivateFieldSet(this, _TokenDetectionController_selectedAccountId, selectedAccount.id, "f"); |
| 63 | ++ await __classPrivateFieldGet(this, _TokenDetectionController_instances, "m", _TokenDetectionController_restartTokenDetection).call(this, { |
| 64 | ++ selectedAddress: selectedAccount.address, |
| 65 | ++ chainIds, |
| 66 | ++ }); |
| 67 | ++ } |
| 68 | ++ }); |
| 69 | + }, _TokenDetectionController_stopPolling = function _TokenDetectionController_stopPolling() { |
| 70 | + if (__classPrivateFieldGet(this, _TokenDetectionController_intervalId, "f")) { |
| 71 | + clearInterval(__classPrivateFieldGet(this, _TokenDetectionController_intervalId, "f")); |
0 commit comments