@metamask-previews/bridge-controller 77.8.0-preview-5959fe813 → 77.8.0-preview-0d2cbf546
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/CHANGELOG.md +0 -12
- package/dist/bridge-controller.cjs +3 -8
- package/dist/bridge-controller.cjs.map +1 -1
- package/dist/bridge-controller.d.cts +3 -4
- package/dist/bridge-controller.d.cts.map +1 -1
- package/dist/bridge-controller.d.mts +3 -4
- package/dist/bridge-controller.d.mts.map +1 -1
- package/dist/bridge-controller.mjs +3 -8
- package/dist/bridge-controller.mjs.map +1 -1
- package/dist/index.cjs +2 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -12
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +4 -12
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -7
- package/dist/index.mjs.map +1 -1
- package/dist/selectors.cjs +29 -31
- package/dist/selectors.cjs.map +1 -1
- package/dist/selectors.d.cts +36410 -5110
- package/dist/selectors.d.cts.map +1 -1
- package/dist/selectors.d.mts +36410 -5110
- package/dist/selectors.d.mts.map +1 -1
- package/dist/selectors.mjs +29 -31
- package/dist/selectors.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +7 -2
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +7 -2
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/dist/utils/bridge.cjs +5 -1
- package/dist/utils/bridge.cjs.map +1 -1
- package/dist/utils/bridge.d.cts +19 -2
- package/dist/utils/bridge.d.cts.map +1 -1
- package/dist/utils/bridge.d.mts +19 -2
- package/dist/utils/bridge.d.mts.map +1 -1
- package/dist/utils/bridge.mjs +3 -0
- package/dist/utils/bridge.mjs.map +1 -1
- package/dist/utils/caip-formatters.cjs +3 -0
- package/dist/utils/caip-formatters.cjs.map +1 -1
- package/dist/utils/caip-formatters.d.cts.map +1 -1
- package/dist/utils/caip-formatters.d.mts.map +1 -1
- package/dist/utils/caip-formatters.mjs +3 -0
- package/dist/utils/caip-formatters.mjs.map +1 -1
- package/dist/utils/feature-flags.d.cts +2 -2
- package/dist/utils/feature-flags.d.mts +2 -2
- package/dist/utils/fetch.cjs +40 -37
- package/dist/utils/fetch.cjs.map +1 -1
- package/dist/utils/fetch.d.cts +4 -10
- package/dist/utils/fetch.d.cts.map +1 -1
- package/dist/utils/fetch.d.mts +4 -10
- package/dist/utils/fetch.d.mts.map +1 -1
- package/dist/utils/fetch.mjs +40 -37
- package/dist/utils/fetch.mjs.map +1 -1
- package/dist/utils/metrics/properties.cjs +6 -6
- package/dist/utils/metrics/properties.cjs.map +1 -1
- package/dist/utils/metrics/properties.d.cts +5 -8
- package/dist/utils/metrics/properties.d.cts.map +1 -1
- package/dist/utils/metrics/properties.d.mts +5 -8
- package/dist/utils/metrics/properties.d.mts.map +1 -1
- package/dist/utils/metrics/properties.mjs +6 -6
- package/dist/utils/metrics/properties.mjs.map +1 -1
- package/dist/utils/metrics/types.cjs.map +1 -1
- package/dist/utils/metrics/types.d.cts +1 -1
- package/dist/utils/metrics/types.d.cts.map +1 -1
- package/dist/utils/metrics/types.d.mts +1 -1
- package/dist/utils/metrics/types.d.mts.map +1 -1
- package/dist/utils/metrics/types.mjs.map +1 -1
- package/dist/utils/number-formatters.cjs +1 -74
- package/dist/utils/number-formatters.cjs.map +1 -1
- package/dist/utils/number-formatters.d.cts +0 -18
- package/dist/utils/number-formatters.d.cts.map +1 -1
- package/dist/utils/number-formatters.d.mts +0 -18
- package/dist/utils/number-formatters.d.mts.map +1 -1
- package/dist/utils/number-formatters.mjs +0 -71
- package/dist/utils/number-formatters.mjs.map +1 -1
- package/dist/utils/quote-fees.cjs +22 -23
- package/dist/utils/quote-fees.cjs.map +1 -1
- package/dist/utils/quote-fees.d.cts +2 -4
- package/dist/utils/quote-fees.d.cts.map +1 -1
- package/dist/utils/quote-fees.d.mts +2 -4
- package/dist/utils/quote-fees.d.mts.map +1 -1
- package/dist/utils/quote-fees.mjs +23 -24
- package/dist/utils/quote-fees.mjs.map +1 -1
- package/dist/utils/quote-metadata/calculators.cjs +35 -33
- package/dist/utils/quote-metadata/calculators.cjs.map +1 -1
- package/dist/utils/quote-metadata/calculators.d.cts +14 -20
- package/dist/utils/quote-metadata/calculators.d.cts.map +1 -1
- package/dist/utils/quote-metadata/calculators.d.mts +14 -20
- package/dist/utils/quote-metadata/calculators.d.mts.map +1 -1
- package/dist/utils/quote-metadata/calculators.mjs +36 -34
- package/dist/utils/quote-metadata/calculators.mjs.map +1 -1
- package/dist/utils/quote-metadata/merge.cjs +2 -24
- package/dist/utils/quote-metadata/merge.cjs.map +1 -1
- package/dist/utils/quote-metadata/merge.d.cts +2 -3
- package/dist/utils/quote-metadata/merge.d.cts.map +1 -1
- package/dist/utils/quote-metadata/merge.d.mts +2 -3
- package/dist/utils/quote-metadata/merge.d.mts.map +1 -1
- package/dist/utils/quote-metadata/merge.mjs +2 -24
- package/dist/utils/quote-metadata/merge.mjs.map +1 -1
- package/dist/utils/slippage.d.cts +1 -1
- package/dist/utils/slippage.d.mts +1 -1
- package/dist/validators/batch-sell.d.cts +8 -8
- package/dist/validators/batch-sell.d.mts +8 -8
- package/dist/validators/bridge-asset.cjs +1 -65
- package/dist/validators/bridge-asset.cjs.map +1 -1
- package/dist/validators/bridge-asset.d.cts +5 -99
- package/dist/validators/bridge-asset.d.cts.map +1 -1
- package/dist/validators/bridge-asset.d.mts +5 -99
- package/dist/validators/bridge-asset.d.mts.map +1 -1
- package/dist/validators/bridge-asset.mjs +1 -64
- package/dist/validators/bridge-asset.mjs.map +1 -1
- package/dist/validators/feature-flags.d.cts +5 -5
- package/dist/validators/feature-flags.d.mts +5 -5
- package/dist/validators/intent.d.cts +3 -3
- package/dist/validators/intent.d.mts +3 -3
- package/dist/validators/quote-response-v1.d.cts +179 -179
- package/dist/validators/quote-response-v1.d.mts +179 -179
- package/dist/validators/quote.cjs +3 -73
- package/dist/validators/quote.cjs.map +1 -1
- package/dist/validators/quote.d.cts +45 -407
- package/dist/validators/quote.d.cts.map +1 -1
- package/dist/validators/quote.d.mts +45 -407
- package/dist/validators/quote.d.mts.map +1 -1
- package/dist/validators/quote.mjs +4 -74
- package/dist/validators/quote.mjs.map +1 -1
- package/dist/validators/step.cjs +1 -7
- package/dist/validators/step.cjs.map +1 -1
- package/dist/validators/step.d.cts +26 -197
- package/dist/validators/step.d.cts.map +1 -1
- package/dist/validators/step.d.mts +26 -197
- package/dist/validators/step.d.mts.map +1 -1
- package/dist/validators/step.mjs +1 -7
- package/dist/validators/step.mjs.map +1 -1
- package/dist/validators/token-feature.d.cts +2 -2
- package/dist/validators/token-feature.d.mts +2 -2
- package/dist/validators/trade.d.cts +2 -2
- package/dist/validators/trade.d.mts +2 -2
- package/package.json +1 -1
- package/dist/coercers/quote-response-v1-to-v2.cjs +0 -137
- package/dist/coercers/quote-response-v1-to-v2.cjs.map +0 -1
- package/dist/coercers/quote-response-v1-to-v2.d.cts +0 -13
- package/dist/coercers/quote-response-v1-to-v2.d.cts.map +0 -1
- package/dist/coercers/quote-response-v1-to-v2.d.mts +0 -13
- package/dist/coercers/quote-response-v1-to-v2.d.mts.map +0 -1
- package/dist/coercers/quote-response-v1-to-v2.mjs +0 -132
- package/dist/coercers/quote-response-v1-to-v2.mjs.map +0 -1
- package/dist/coercers/quote-response-v2-to-v1.cjs +0 -173
- package/dist/coercers/quote-response-v2-to-v1.cjs.map +0 -1
- package/dist/coercers/quote-response-v2-to-v1.d.cts +0 -13
- package/dist/coercers/quote-response-v2-to-v1.d.cts.map +0 -1
- package/dist/coercers/quote-response-v2-to-v1.d.mts +0 -13
- package/dist/coercers/quote-response-v2-to-v1.d.mts.map +0 -1
- package/dist/coercers/quote-response-v2-to-v1.mjs +0 -169
- package/dist/coercers/quote-response-v2-to-v1.mjs.map +0 -1
- package/dist/utils/quote-metadata/to-normalized-amounts.cjs +0 -38
- package/dist/utils/quote-metadata/to-normalized-amounts.cjs.map +0 -1
- package/dist/utils/quote-metadata/to-normalized-amounts.d.cts +0 -10
- package/dist/utils/quote-metadata/to-normalized-amounts.d.cts.map +0 -1
- package/dist/utils/quote-metadata/to-normalized-amounts.d.mts +0 -10
- package/dist/utils/quote-metadata/to-normalized-amounts.d.mts.map +0 -1
- package/dist/utils/quote-metadata/to-normalized-amounts.mjs +0 -34
- package/dist/utils/quote-metadata/to-normalized-amounts.mjs.map +0 -1
- package/dist/utils/quote-metadata/to-quote-metadata-v1.cjs +0 -39
- package/dist/utils/quote-metadata/to-quote-metadata-v1.cjs.map +0 -1
- package/dist/utils/quote-metadata/to-quote-metadata-v1.d.cts +0 -13
- package/dist/utils/quote-metadata/to-quote-metadata-v1.d.cts.map +0 -1
- package/dist/utils/quote-metadata/to-quote-metadata-v1.d.mts +0 -13
- package/dist/utils/quote-metadata/to-quote-metadata-v1.d.mts.map +0 -1
- package/dist/utils/quote-metadata/to-quote-metadata-v1.mjs +0 -36
- package/dist/utils/quote-metadata/to-quote-metadata-v1.mjs.map +0 -1
- package/dist/utils/quote-metadata/to-quote-metadata-v2.cjs +0 -94
- package/dist/utils/quote-metadata/to-quote-metadata-v2.cjs.map +0 -1
- package/dist/utils/quote-metadata/to-quote-metadata-v2.d.cts +0 -12
- package/dist/utils/quote-metadata/to-quote-metadata-v2.d.cts.map +0 -1
- package/dist/utils/quote-metadata/to-quote-metadata-v2.d.mts +0 -12
- package/dist/utils/quote-metadata/to-quote-metadata-v2.d.mts.map +0 -1
- package/dist/utils/quote-metadata/to-quote-metadata-v2.mjs +0 -90
- package/dist/utils/quote-metadata/to-quote-metadata-v2.mjs.map +0 -1
- package/dist/validators/amount-and-asset.cjs +0 -27
- package/dist/validators/amount-and-asset.cjs.map +0 -1
- package/dist/validators/amount-and-asset.d.cts +0 -62
- package/dist/validators/amount-and-asset.d.cts.map +0 -1
- package/dist/validators/amount-and-asset.d.mts +0 -62
- package/dist/validators/amount-and-asset.d.mts.map +0 -1
- package/dist/validators/amount-and-asset.mjs +0 -24
- package/dist/validators/amount-and-asset.mjs.map +0 -1
- package/dist/validators/quote-response.cjs +0 -116
- package/dist/validators/quote-response.cjs.map +0 -1
- package/dist/validators/quote-response.d.cts +0 -1979
- package/dist/validators/quote-response.d.cts.map +0 -1
- package/dist/validators/quote-response.d.mts +0 -1979
- package/dist/validators/quote-response.d.mts.map +0 -1
- package/dist/validators/quote-response.mjs +0 -112
- package/dist/validators/quote-response.mjs.map +0 -1
package/dist/selectors.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.d.mts","sourceRoot":"","sources":["../src/selectors.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,iBAAiB,EACjB,oCAAoC,EACpC,yBAAyB,EAC1B,qCAAqC;AACtC,OAAO,KAAK,EAEV,wBAAwB,EACzB,qCAAqC;AACtC,OAAO,KAAK,EAAE,aAAa,EAAE,wBAAwB;AAUrD,OAAO,KAAK,EAAE,qBAAqB,EAAe,YAAY,EAAE,oBAAgB;AAChF,OAAO,EAAiB,SAAS,EAAE,oBAAgB;AAiBnD,OAAO,KAAK,EAAE,aAAa,EAAE,yCAAqC;AAClE,OAAO,EAAE,4BAA4B,EAAE,6BAAyB;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,wCAAoC;AAEjE;;GAEG;AACH,KAAK,2BAA2B,GAAG,oCAAoC,GACrE,yBAAyB,GACzB,iBAAiB,GACjB,IAAI,CAAC,qBAAqB,EAAE,oBAAoB,CAAC,CAAC;AACpD;;GAEG;AACH,KAAK,gCAAgC,GAAG;IACtC,kBAAkB,EAAE;QAClB,YAAY,EAAE,OAAO,CAAC;KACvB,CAAC;CACH,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAC7C,qBAAqB,EACrB,oBAAoB,CACrB,GACC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC,GAAG;IAClD,UAAU,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isNonEvmChainId } from "./utils/bridge.mjs";
|
|
11
11
|
import { formatAddressToAssetId, formatAddressToCaipReference, formatChainIdToCaip, formatChainIdToHex } from "./utils/caip-formatters.mjs";
|
|
12
12
|
import { processFeatureFlags } from "./utils/feature-flags.mjs";
|
|
13
|
-
import { sumAmounts } from "./utils/number-formatters.mjs";
|
|
14
13
|
import { calcBatchFees } from "./utils/quote-metadata/calculators.mjs";
|
|
15
14
|
import { calcQuoteMetadata } from "./utils/quote-metadata/calculators.mjs";
|
|
16
15
|
import { mergeQuoteMetadata } from "./utils/quote-metadata/merge.mjs";
|
|
@@ -168,7 +167,7 @@ export const selectIsAssetExchangeRateInState = (state, assetId) => Boolean(sele
|
|
|
168
167
|
*/
|
|
169
168
|
const selectBridgeFeesPerGas = createBridgeSelector([
|
|
170
169
|
(state) => state.gasFeeEstimatesByChainId,
|
|
171
|
-
(state) => state.quotes?.[0]?.
|
|
170
|
+
(state) => state.quotes?.[0]?.quote.srcChainId,
|
|
172
171
|
], (gasFeeEstimatesByChainId, srcChainId) => {
|
|
173
172
|
if (!srcChainId) {
|
|
174
173
|
return null;
|
|
@@ -202,10 +201,11 @@ const selectMetadata = createBridgeSelector([
|
|
|
202
201
|
], (quotes, bridgeFeesPerGas, exchangeRateSources, quoteRequest) => {
|
|
203
202
|
const { destTokenAddress, srcChainId, destChainId } = quoteRequest[0] ?? {};
|
|
204
203
|
return quotes.map((quote) => calcQuoteMetadata(quote, {
|
|
205
|
-
srcTokenExchangeRate: selectExchangeRateByAssetId(exchangeRateSources, quote.quote.
|
|
204
|
+
srcTokenExchangeRate: selectExchangeRateByAssetId(exchangeRateSources, quote.quote.srcAsset.assetId),
|
|
206
205
|
bridgeFeesPerGas,
|
|
207
|
-
destTokenExchangeRate: selectExchangeRateByAssetId(exchangeRateSources, formatAddressToAssetId(destTokenAddress ?? quote.quote.
|
|
208
|
-
nativeExchangeRate: selectExchangeRateByAssetId(exchangeRateSources, getNativeAssetForChainId(srcChainId ?? quote.
|
|
206
|
+
destTokenExchangeRate: selectExchangeRateByAssetId(exchangeRateSources, formatAddressToAssetId(destTokenAddress ?? quote.quote.destAsset.assetId, destChainId)),
|
|
207
|
+
nativeExchangeRate: selectExchangeRateByAssetId(exchangeRateSources, getNativeAssetForChainId(srcChainId ?? quote.quote.srcChainId)
|
|
208
|
+
?.assetId),
|
|
209
209
|
}));
|
|
210
210
|
});
|
|
211
211
|
// Selects cross-chain swap quotes including their metadata
|
|
@@ -218,22 +218,21 @@ const selectSortedBridgeQuotes = createBridgeSelector([
|
|
|
218
218
|
case SortOrder.ETA_ASC:
|
|
219
219
|
return orderBy(quotesWithMetadata, (quote) => quote.estimatedProcessingTimeInSeconds, 'asc');
|
|
220
220
|
default:
|
|
221
|
-
if (quotesWithMetadata.every((quote) => quote
|
|
222
|
-
return orderBy(quotesWithMetadata, ({
|
|
221
|
+
if (quotesWithMetadata.every((quote) => quote?.cost?.valueInCurrency)) {
|
|
222
|
+
return orderBy(quotesWithMetadata, ({ cost }) => Number(cost?.valueInCurrency), 'asc');
|
|
223
223
|
}
|
|
224
|
-
if (quotesWithMetadata.every((quote) => quote.quote.priceData?.priceImpact
|
|
225
|
-
return orderBy(quotesWithMetadata, ({ quote }) => Number(quote.priceData?.priceImpact
|
|
224
|
+
if (quotesWithMetadata.every((quote) => quote.quote.priceData?.priceImpact)) {
|
|
225
|
+
return orderBy(quotesWithMetadata, ({ quote }) => Number(quote.priceData?.priceImpact), 'asc');
|
|
226
226
|
}
|
|
227
|
-
return orderBy(quotesWithMetadata, ({ quote }) => Number(quote.
|
|
227
|
+
return orderBy(quotesWithMetadata, ({ quote }) => Number(quote.destTokenAmount), 'desc');
|
|
228
228
|
}
|
|
229
229
|
});
|
|
230
230
|
const selectRecommendedQuote = createBridgeSelector([selectSortedBridgeQuotes], (quotes) => (quotes.length > 0 ? quotes[0] : null));
|
|
231
231
|
const selectActiveQuote = createBridgeSelector([
|
|
232
232
|
selectRecommendedQuote,
|
|
233
233
|
selectSortedBridgeQuotes,
|
|
234
|
-
(_, { selectedQuote }) => selectedQuote
|
|
235
|
-
], (recommendedQuote, sortedQuotes,
|
|
236
|
-
recommendedQuote);
|
|
234
|
+
(_, { selectedQuote }) => selectedQuote,
|
|
235
|
+
], (recommendedQuote, sortedQuotes, selectedQuote) => sortedQuotes.find((quote) => quote.quote.requestId === selectedQuote?.quote.requestId) ?? recommendedQuote);
|
|
237
236
|
const selectIsQuoteGoingToRefresh = createBridgeSelector([
|
|
238
237
|
selectBridgeFeatureFlags,
|
|
239
238
|
// If at least one quote request is sufficiently funded, continue polling until max refresh count is reached
|
|
@@ -289,22 +288,21 @@ const selectRecommendedQuotes = createBridgeSelector([
|
|
|
289
288
|
acc[requestIndex] ?? (acc[requestIndex] = quote);
|
|
290
289
|
return acc;
|
|
291
290
|
}, Array(requestCount).fill(null)));
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
})
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
});
|
|
291
|
+
const selectMetadataSum = createBridgeSelector([
|
|
292
|
+
selectRecommendedQuotes,
|
|
293
|
+
(_, { key, }) => key,
|
|
294
|
+
], (recommendedQuotes, key) => recommendedQuotes.reduce((acc, quote) => {
|
|
295
|
+
acc.usd = new BigNumber(acc.usd)
|
|
296
|
+
.plus(quote?.[key]?.usd ?? 0)
|
|
297
|
+
.toString();
|
|
298
|
+
acc.valueInCurrency = new BigNumber(acc.valueInCurrency)
|
|
299
|
+
.plus(quote?.[key]?.valueInCurrency ?? 0)
|
|
300
|
+
.toString();
|
|
301
|
+
acc.amount = new BigNumber(acc.amount)
|
|
302
|
+
.plus(quote?.[key]?.amount ?? 0)
|
|
303
|
+
.toString();
|
|
304
|
+
return acc;
|
|
305
|
+
}, { usd: '0', valueInCurrency: '0', amount: '0' }));
|
|
308
306
|
/**
|
|
309
307
|
* Selects the recommended swap quotes for a batch of quote requests.
|
|
310
308
|
*
|
|
@@ -327,8 +325,8 @@ const selectMinDestAmountSum = createBridgeSelector([selectDestAmountSum], (dest
|
|
|
327
325
|
*/
|
|
328
326
|
export const selectBatchSellQuotes = createStructuredBridgeSelector({
|
|
329
327
|
recommendedQuotes: selectRecommendedQuotes,
|
|
330
|
-
totalReceived:
|
|
331
|
-
minimumReceived:
|
|
328
|
+
totalReceived: (state, opts) => selectMetadataSum(state, { ...opts, key: 'toTokenAmount' }),
|
|
329
|
+
minimumReceived: (state, opts) => selectMetadataSum(state, { ...opts, key: 'minToTokenAmount' }),
|
|
332
330
|
quotesLastFetchedMs: (state) => state.quotesLastFetched,
|
|
333
331
|
isLoading: (state) => state.quotesLoadingStatus === RequestStatus.LOADING,
|
|
334
332
|
quoteFetchError: (state) => state.quoteFetchError,
|
package/dist/selectors.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.mjs","sourceRoot":"","sources":["../src/selectors.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,OAAO,EAAE,UAAU,EAAE,+BAA+B;AAWpD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,wBAAwB;AACxE,OAAO,EAAE,SAAS,EAAE,qBAAqB;;;AAEzC,OAAO,EACL,cAAc,IAAI,eAAe,EACjC,wBAAwB,IAAI,yBAAyB,EACtD,iBAAiB;AAElB,OAAO,EAAE,6BAA6B,EAAE,+BAA2B;AAEnE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,oBAAgB;AACnD,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,eAAe,EAChB,2BAAuB;AACxB,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAC5B,mBAAmB,EACnB,kBAAkB,EACnB,oCAAgC;AACjC,OAAO,EAAE,mBAAmB,EAAE,kCAA8B;AAC5D,OAAO,EAAE,UAAU,EAAE,sCAAkC;AACvD,OA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B,CAAC,KAAK,CAAC,CAAC,MAAM;IACjD,CAAC,CAAC,EAAE,cAAkE,EAAE,EAAE,CACxE,cAAc,CAAC,eAAe;IAChC,CAAC,CAAC,EAAE,cAAkE,EAAE,EAAE,CACxE,cAAc,CAAC,gBAAgB;IACjC,CAAC,CAAC,EAAE,cAAkE,EAAE,EAAE,CACxE,cAAc,CAAC,UAAU;QACvB,CAAC,CAAC,mBAAmB,CAAC,cAAc,CAAC,UAAU,CAAC;QAChD,CAAC,CAAC,SAAS;IACf,CAAC,CAAC,EAAE,cAAkE,EAAE,EAAE,CACxE,cAAc,CAAC,WAAW;QACxB,CAAC,CAAC,mBAAmB,CAAC,cAAc,CAAC,WAAW,CAAC;QACjD,CAAC,CAAC,SAAS;CAChB,EACD,CACE,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,EAAE;IACF,OAAO,4BAA4B,CACjC;QACE,eAAe;QACf,gBAAgB;QAChB,UAAU;QACV,WAAW;KACZ,EACD,UAAU,CAAC,CAAC,CAAC,mBAAmB,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,SAAS,EACrE,WAAW,CAAC,CAAC,CAAC,mBAAmB,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,SAAS,CACxE,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\nimport { getAddress } from '@ethersproject/address';\nimport type {\n CurrencyRateState,\n MultichainAssetsRatesControllerState,\n TokenRatesControllerState,\n} from '@metamask/assets-controllers';\nimport type {\n GasFeeEstimates,\n GasFeeEstimatesByChainId,\n} from '@metamask/gas-fee-controller';\nimport type { CaipAssetType } from '@metamask/utils';\nimport { isStrictHexString, parseCaipAssetType } from '@metamask/utils';\nimport { BigNumber } from 'bignumber.js';\nimport { orderBy } from 'lodash';\nimport {\n createSelector as createSelector_,\n createStructuredSelector as createStructuredSelector_,\n} from 'reselect';\n\nimport { BRIDGE_PREFERRED_GAS_ESTIMATE } from './constants/bridge';\nimport type { BridgeControllerState, DeepPartial, ExchangeRate } from './types';\nimport { RequestStatus, SortOrder } from './types';\nimport {\n getNativeAssetForChainId,\n isNativeAddress,\n isNonEvmChainId,\n} from './utils/bridge';\nimport {\n formatAddressToAssetId,\n formatAddressToCaipReference,\n formatChainIdToCaip,\n formatChainIdToHex,\n} from './utils/caip-formatters';\nimport { processFeatureFlags } from './utils/feature-flags';\nimport { sumAmounts } from './utils/number-formatters';\nimport { calcBatchFees } from './utils/quote-metadata/calculators';\nimport { calcQuoteMetadata } from './utils/quote-metadata/calculators';\nimport { mergeQuoteMetadata } from './utils/quote-metadata/merge';\nimport type { QuoteMetadata } from './utils/quote-metadata/types';\nimport { getDefaultSlippagePercentage } from './utils/slippage';\nimport type { QuoteResponse } from './validators/quote-response';\n\n/**\n * The controller states that provide exchange rates\n */\ntype ExchangeRateControllerState = MultichainAssetsRatesControllerState &\n TokenRatesControllerState &\n CurrencyRateState &\n Pick<BridgeControllerState, 'assetExchangeRates'>;\n/**\n * The state of the bridge controller and all its dependency controllers\n */\ntype RemoteFeatureFlagControllerState = {\n remoteFeatureFlags: {\n bridgeConfig: unknown;\n };\n};\n\n/**\n * Minimal shape required for exchange-rate lookups (used by getExchangeRateByChainIdAndAddress).\n * Uses types from assets-controllers; marketData and conversionRates also accept the bridge format.\n */\nexport type ExchangeRateSourcesForLookup = Pick<\n BridgeControllerState,\n 'assetExchangeRates'\n> &\n Partial<Pick<CurrencyRateState, 'currencyRates'>> & {\n marketData?:\n | TokenRatesControllerState['marketData']\n | Record<string, Record<string, { price?: number; currency?: string }>>;\n conversionRates?:\n | MultichainAssetsRatesControllerState['conversionRates']\n | Record<string, { rate: string }>;\n };\n\nexport type BridgeAppState = BridgeControllerState & {\n gasFeeEstimatesByChainId: GasFeeEstimatesByChainId;\n} & ExchangeRateControllerState & {\n participateInMetaMetrics: boolean;\n } & RemoteFeatureFlagControllerState;\n/**\n * Creates a structured selector for the bridge controller\n */\nconst createStructuredBridgeSelector =\n createStructuredSelector_.withTypes<BridgeAppState>();\n/**\n * Creates a typed selector for the bridge controller\n */\nconst createBridgeSelector = createSelector_.withTypes<BridgeAppState>();\n/**\n * Required parameters that clients must provide for the bridge quotes selector\n */\ntype BridgeQuotesClientParams = {\n sortOrder: SortOrder;\n selectedQuote: (QuoteResponse & QuoteMetadata) | null;\n};\n\ntype EvmTokenExchangeRate = { price?: number; currency?: string };\ntype EvmTokenExchangeRates = Record<string, EvmTokenExchangeRate>;\n\nconst createFeatureFlagsSelector =\n createSelector_.withTypes<RemoteFeatureFlagControllerState>();\n\n/**\n * Selects the bridge feature flags\n *\n * @param state - The state of the bridge controller\n * @returns The bridge feature flags\n *\n * @example\n * ```ts\n * const featureFlags = useSelector(state => selectBridgeFeatureFlags(state));\n *\n * Or\n *\n * export const selectBridgeFeatureFlags = createSelector(\n * selectRemoteFeatureFlags,\n * (remoteFeatureFlags) =>\n * selectBridgeFeatureFlagsBase({\n * bridgeConfig: remoteFeatureFlags.bridgeConfig,\n * }),\n * );\n * ```\n */\nexport const selectBridgeFeatureFlags = createFeatureFlagsSelector(\n [(state) => state.remoteFeatureFlags.bridgeConfig],\n (bridgeConfig: unknown) => processFeatureFlags(bridgeConfig),\n);\n\nconst getEvmTokenExchangeRateForAddress = (\n evmTokenExchangeRates: EvmTokenExchangeRates | undefined,\n address: string,\n): EvmTokenExchangeRate | null | undefined => {\n try {\n return isStrictHexString(address)\n ? (evmTokenExchangeRates?.[getAddress(address)] ??\n evmTokenExchangeRates?.[address.toLowerCase()])\n : null;\n } catch {\n return null;\n }\n};\n\n/**\n * Selects the asset exchange rate for a given chain and address\n *\n * @param exchangeRateSources - the controller states containing the exchange rates\n * @param assetId - the assetId to get the exchange rate for\n * @returns The asset exchange rate for the given assetId\n */\nexport const selectExchangeRateByAssetId = (\n exchangeRateSources: ExchangeRateSourcesForLookup,\n assetId?: CaipAssetType,\n): ExchangeRate => {\n if (!assetId) {\n return {};\n }\n\n const { assetExchangeRates, currencyRates, marketData, conversionRates } =\n exchangeRateSources;\n\n // If the asset exchange rate is available in the bridge controller, use it\n // This is defined if the token's rate is not available from the assets controllers\n const bridgeControllerRate =\n assetExchangeRates?.[assetId.toLowerCase() as CaipAssetType] ??\n assetExchangeRates?.[assetId];\n if (\n bridgeControllerRate?.exchangeRate &&\n bridgeControllerRate?.usdExchangeRate\n ) {\n return bridgeControllerRate;\n }\n\n const { chainId } = parseCaipAssetType(assetId);\n\n // If the chain is a non-EVM chain, use the conversion rate from the multichain assets controller\n if (isNonEvmChainId(chainId)) {\n const conversionRatesByKey = conversionRates as\n | Record<string, { rate?: string }>\n | undefined;\n const multichainAssetExchangeRate = conversionRatesByKey?.[assetId];\n const rate = multichainAssetExchangeRate?.rate;\n if (rate) {\n // The multichain rate is denominated in the user's selected currency.\n // To get a USD rate, find the user's-currency-to-USD conversion factor from any EVM native currency rate.\n const nativeCurrencyRate = Object.values(currencyRates ?? {}).find(\n (rateEntry) =>\n rateEntry?.conversionRate !== undefined &&\n rateEntry?.conversionRate !== null &&\n rateEntry?.usdConversionRate !== undefined &&\n rateEntry?.usdConversionRate !== null,\n );\n const usersCurrencyToUsdRate =\n nativeCurrencyRate?.conversionRate !== undefined &&\n nativeCurrencyRate?.conversionRate !== null &&\n nativeCurrencyRate?.usdConversionRate !== undefined &&\n nativeCurrencyRate?.usdConversionRate !== null\n ? new BigNumber(nativeCurrencyRate.usdConversionRate).div(\n nativeCurrencyRate.conversionRate,\n )\n : undefined;\n const usdExchangeRate = usersCurrencyToUsdRate\n ? new BigNumber(rate).times(usersCurrencyToUsdRate).toString()\n : undefined;\n return {\n exchangeRate: rate,\n usdExchangeRate,\n };\n }\n return {};\n }\n\n const address = formatAddressToCaipReference(assetId);\n\n // If the chain is an EVM chain, use the conversion rate from the currency rates controller\n if (isNativeAddress(address)) {\n const { symbol } = getNativeAssetForChainId(chainId);\n const evmNativeExchangeRate = currencyRates?.[symbol];\n if (evmNativeExchangeRate) {\n return {\n exchangeRate: evmNativeExchangeRate.conversionRate?.toString(),\n usdExchangeRate: evmNativeExchangeRate.usdConversionRate?.toString(),\n };\n }\n return {};\n }\n // If the chain is an EVM chain and the asset is not the native asset, use the conversion rate from the token rates controller\n if (!isNonEvmChainId(chainId)) {\n const marketDataByChain =\n (marketData as Record<string, EvmTokenExchangeRates> | undefined) ?? {};\n const evmTokenExchangeRates =\n marketDataByChain[formatChainIdToHex(chainId)];\n const evmTokenExchangeRateForAddress = getEvmTokenExchangeRateForAddress(\n evmTokenExchangeRates,\n address,\n );\n const currencyKey = evmTokenExchangeRateForAddress?.currency;\n const nativeCurrencyRate =\n currencyKey !== undefined && currencyKey !== null\n ? currencyRates?.[currencyKey]\n : undefined;\n const price = evmTokenExchangeRateForAddress?.price;\n // A missing or zero price is not a usable exchange rate. Returning a \"0\"\n // rate here is harmful in two ways: it surfaces a $0 fiat value, and it\n // makes `selectIsAssetExchangeRateInState` treat the token as already\n // priced (the non-empty \"0\" string is truthy), which prevents the\n // controller from fetching the real rate. Fall through to `{}` instead so\n // the rate gets fetched from the price API.\n if (price && nativeCurrencyRate) {\n return {\n exchangeRate: new BigNumber(price)\n .multipliedBy(nativeCurrencyRate.conversionRate ?? 0)\n .toString(),\n usdExchangeRate: new BigNumber(price)\n .multipliedBy(nativeCurrencyRate.usdConversionRate ?? 0)\n .toString(),\n };\n }\n }\n\n return {};\n};\n\n/**\n * Checks whether an exchange rate is available for a given assetId\n *\n * @param state The state of the bridge controller and its dependency controllers\n * @param assetId The assetId to check\n * @returns Whether an exchange rate is available for the given chain and address\n */\nexport const selectIsAssetExchangeRateInState = (\n state: ExchangeRateSourcesForLookup,\n assetId?: CaipAssetType,\n) =>\n Boolean(selectExchangeRateByAssetId(state, assetId)?.exchangeRate) &&\n Boolean(selectExchangeRateByAssetId(state, assetId)?.usdExchangeRate);\n\n/**\n * Selects the gas fee estimates from the gas fee controller. All potential networks\n * support EIP1559 gas fees so assume that gasFeeEstimates is of type GasFeeEstimates\n *\n * @param state - The state of the bridge controller and its dependency controllers\n * @param state.gasFeeEstimatesByChainId - gasEstimates by Hex ChainId\n * @param state.quotes - Fetched bridge/swap quotes\n * @returns The gas fee estimates in decGWEI\n */\nconst selectBridgeFeesPerGas = createBridgeSelector(\n [\n (state) => state.gasFeeEstimatesByChainId,\n (state) => state.quotes?.[0]?.chainId,\n ],\n (gasFeeEstimatesByChainId, srcChainId) => {\n if (!srcChainId) {\n return null;\n }\n if (isNonEvmChainId(srcChainId)) {\n return null;\n }\n // @ts-expect-error - all supported networks use this type of estimates\n const gasFeeEstimates: GasFeeEstimates | undefined =\n gasFeeEstimatesByChainId?.[\n formatChainIdToHex(srcChainId) as keyof typeof gasFeeEstimatesByChainId\n ]?.gasFeeEstimates;\n if (!gasFeeEstimates) {\n return null;\n }\n return {\n estimatedBaseFeeInDecGwei: gasFeeEstimates.estimatedBaseFee,\n feePerGasInDecGwei:\n gasFeeEstimates[BRIDGE_PREFERRED_GAS_ESTIMATE]?.suggestedMaxFeePerGas,\n maxFeePerGasInDecGwei: gasFeeEstimates.high?.suggestedMaxFeePerGas,\n };\n },\n);\n\nconst selectExchangeRateSources = createStructuredBridgeSelector({\n currencyRates: (state) => state.currencyRates,\n marketData: (state) => state.marketData,\n conversionRates: (state) => state.conversionRates,\n assetExchangeRates: (state) => state.assetExchangeRates,\n});\n\n// Selects metadata for cross-chain swap quotes\nconst selectMetadata = createBridgeSelector(\n [\n ({ quotes }) => quotes,\n selectBridgeFeesPerGas,\n selectExchangeRateSources,\n ({ quoteRequest }) => quoteRequest,\n ],\n (quotes, bridgeFeesPerGas, exchangeRateSources, quoteRequest) => {\n const { destTokenAddress, srcChainId, destChainId } = quoteRequest[0] ?? {};\n\n return quotes.map((quote) =>\n calcQuoteMetadata(quote, {\n srcTokenExchangeRate: selectExchangeRateByAssetId(\n exchangeRateSources,\n quote.quote.src.asset.assetId,\n ),\n bridgeFeesPerGas,\n destTokenExchangeRate: selectExchangeRateByAssetId(\n exchangeRateSources,\n formatAddressToAssetId(\n destTokenAddress ?? quote.quote.dest.asset.assetId,\n destChainId,\n ),\n ),\n nativeExchangeRate: selectExchangeRateByAssetId(\n exchangeRateSources,\n getNativeAssetForChainId(srcChainId ?? quote.chainId)?.assetId,\n ),\n }),\n );\n },\n);\n\n// Selects cross-chain swap quotes including their metadata\nconst selectBridgeQuotesWithMetadata = createBridgeSelector(\n [selectMetadata, ({ quotes }) => quotes],\n (quoteMetadata, quotes) =>\n quotes.map((quote, index) =>\n mergeQuoteMetadata(quote, quoteMetadata[index]),\n ),\n);\n\nconst selectSortedBridgeQuotes = createBridgeSelector(\n [\n selectBridgeQuotesWithMetadata,\n (_, { sortOrder }: BridgeQuotesClientParams) => sortOrder,\n ],\n (quotesWithMetadata, sortOrder): (QuoteResponse & QuoteMetadata)[] => {\n switch (sortOrder) {\n case SortOrder.ETA_ASC:\n return orderBy(\n quotesWithMetadata,\n (quote) => quote.estimatedProcessingTimeInSeconds,\n 'asc',\n );\n default:\n if (\n quotesWithMetadata.every(\n (quote) => quote.quote.priceData?.cost?.valueInCurrency,\n )\n ) {\n return orderBy(\n quotesWithMetadata,\n ({ quote: { priceData } }) =>\n Number(priceData?.cost?.valueInCurrency),\n 'asc',\n );\n }\n if (\n quotesWithMetadata.every(\n (quote) => quote.quote.priceData?.priceImpact?.amount,\n )\n ) {\n return orderBy(\n quotesWithMetadata,\n ({ quote }) => Number(quote.priceData?.priceImpact?.amount),\n 'asc',\n );\n }\n return orderBy(\n quotesWithMetadata,\n ({ quote }) => Number(quote.dest.amount),\n 'desc',\n );\n }\n },\n);\n\nconst selectRecommendedQuote = createBridgeSelector(\n [selectSortedBridgeQuotes],\n (quotes) => (quotes.length > 0 ? quotes[0] : null),\n);\n\nconst selectActiveQuote = createBridgeSelector(\n [\n selectRecommendedQuote,\n selectSortedBridgeQuotes,\n (_, { selectedQuote }) => selectedQuote?.quote.requestId,\n ],\n (recommendedQuote, sortedQuotes, requestId) =>\n sortedQuotes.find((quote) => quote.quote.requestId === requestId) ??\n recommendedQuote,\n);\n\nconst selectIsQuoteGoingToRefresh = createBridgeSelector(\n [\n selectBridgeFeatureFlags,\n // If at least one quote request is sufficiently funded, continue polling until max refresh count is reached\n (state) =>\n state.quoteRequest.every((quoteRequest) =>\n Boolean(quoteRequest.insufficientBal),\n ),\n (state) => state.quotesRefreshCount,\n ],\n (featureFlags, insufficientBal, quotesRefreshCount) =>\n insufficientBal ? false : featureFlags.maxRefreshCount > quotesRefreshCount,\n);\n\nconst selectQuoteRefreshRate = createBridgeSelector(\n [selectBridgeFeatureFlags, (state) => state.quoteRequest[0]?.srcChainId],\n (featureFlags, srcChainId) =>\n (srcChainId\n ? featureFlags.chains[formatChainIdToCaip(srcChainId)]?.refreshRate\n : featureFlags.refreshRate) ?? featureFlags.refreshRate,\n);\n\nexport const selectIsQuoteExpired = createBridgeSelector(\n [\n selectIsQuoteGoingToRefresh,\n ({ quotesLastFetched }) => quotesLastFetched,\n selectQuoteRefreshRate,\n (_, _ignoredParam, currentTimeInMs: number) => currentTimeInMs,\n ],\n (isQuoteGoingToRefresh, quotesLastFetched, refreshRate, currentTimeInMs) =>\n Boolean(\n !isQuoteGoingToRefresh &&\n quotesLastFetched &&\n currentTimeInMs - quotesLastFetched > refreshRate,\n ),\n);\n\n/**\n * Selects sorted cross-chain swap quotes. By default, the quotes are sorted by cost in ascending order.\n *\n * @param state - The state of the bridge controller and its dependency controllers\n * @param sortOrder - The sort order of the quotes\n * @param selectedQuote - The quote that is currently selected by the user, should be cleared by clients when the req params change\n * @returns The activeQuote, recommendedQuote, sortedQuotes, and other quote fetching metadata\n *\n * @example\n * ```ts\n * const quotes = useSelector(state => selectBridgeQuotes(\n * { ...state.metamask, bridgeConfig: remoteFeatureFlags.bridgeConfig },\n * {\n * sortOrder: state.bridge.sortOrder,\n * selectedQuote: state.bridge.selectedQuote,\n * }\n * ));\n * ```\n */\nexport const selectBridgeQuotes = createStructuredBridgeSelector({\n sortedQuotes: selectSortedBridgeQuotes,\n recommendedQuote: selectRecommendedQuote,\n activeQuote: selectActiveQuote,\n quotesLastFetchedMs: (state) => state.quotesLastFetched,\n isLoading: (state) => state.quotesLoadingStatus === RequestStatus.LOADING,\n quoteFetchError: (state) => state.quoteFetchError,\n quotesRefreshCount: (state) => state.quotesRefreshCount,\n quotesInitialLoadTimeMs: (state) => state.quotesInitialLoadTime,\n isQuoteGoingToRefresh: selectIsQuoteGoingToRefresh,\n});\n\nconst selectRecommendedQuotes = createBridgeSelector(\n [\n selectSortedBridgeQuotes,\n (_, { requestCount }: { requestCount: number }) => requestCount,\n ],\n (quotes, requestCount) =>\n quotes.reduce((acc, quote) => {\n const requestIndex = quote.quoteRequestIndex ?? 0;\n acc[requestIndex] ??= quote;\n return acc;\n }, Array<QuoteResponse | null>(requestCount).fill(null)),\n);\nconst selectDestAmountSum = createBridgeSelector(\n [selectRecommendedQuotes],\n (recommendedQuotes) => {\n return sumAmounts(recommendedQuotes.map((quote) => quote?.quote.dest));\n },\n);\n\nconst selectMinDestAmountSum = createBridgeSelector(\n [selectDestAmountSum],\n (destAmountSum): DeepPartial<QuoteResponse['quote']['dest']> | undefined => {\n if (!destAmountSum) {\n return undefined;\n }\n\n const {\n minAmount,\n minAmountNormalized,\n minAmountValueInCurrency,\n minAmountUsd,\n asset,\n } = destAmountSum;\n\n return {\n amount: minAmount,\n normalizedAmount: minAmountNormalized,\n valueInCurrency: minAmountValueInCurrency,\n usd: minAmountUsd,\n asset,\n };\n },\n);\n\n/**\n * Selects the recommended swap quotes for a batch of quote requests.\n *\n * @param state - The state of the bridge controller and its dependency controllers\n * @param sortOrder - The sort order of the quotes\n * @param requestCount - The number of quote requests fetched in the batch\n * @returns The quotes for multiple quote requests, including their recommendedQuotes,\n * totalReceived, minimumReceived, totalNetworkFee, and other quote fetching metadata.\n *\n * @example\n * ```ts\n * const quotes = useSelector(state => selectBatchSellQuotes(\n * { ...state.metamask },\n * {\n * sortOrder: state.bridge.sortOrder,\n * requestCount: 4,\n * }\n * ));\n * ```\n */\nexport const selectBatchSellQuotes = createStructuredBridgeSelector({\n recommendedQuotes: selectRecommendedQuotes,\n totalReceived: selectDestAmountSum,\n minimumReceived: selectMinDestAmountSum,\n quotesLastFetchedMs: (state) => state.quotesLastFetched,\n isLoading: (state) => state.quotesLoadingStatus === RequestStatus.LOADING,\n quoteFetchError: (state) => state.quoteFetchError,\n quotesRefreshCount: (state) => state.quotesRefreshCount,\n quotesInitialLoadTimeMs: (state) => state.quotesInitialLoadTime,\n isQuoteGoingToRefresh: selectIsQuoteGoingToRefresh,\n});\n\nconst selectBatchSellFees = createBridgeSelector(\n [\n (state) => state.batchSellTrades?.fee?.amount,\n (state) => state.batchSellTrades?.fee?.asset,\n (state) =>\n selectExchangeRateByAssetId(\n state,\n state.batchSellTrades?.fee?.asset?.assetId,\n ),\n ],\n (feeAmount, feeAsset, exchangeRate) => {\n return feeAmount && feeAsset && exchangeRate\n ? calcBatchFees(feeAmount, feeAsset, exchangeRate)\n : undefined;\n },\n);\n\n/**\n * Selects the batch transactions and fees for a batch of quotes\n *\n * @param state - The state of the bridge controller and its dependency controllers\n * @returns The total transaction fees and whether the batch sell trades are submittable.\n *\n * @example\n * ```ts\n * const { totalNetworkFee, isBatchSellTradeAvailable } = useSelector(state => selectBatchSellTrades(state.metamask));\n * ```\n */\nexport const selectBatchSellTrades = createBridgeSelector(\n [\n (state) => state.batchSellTradesLoadingStatus === RequestStatus.FETCHED,\n (state) => state.batchSellTrades,\n selectBatchSellFees,\n (state) => state.batchSellTradesLoadingStatus === RequestStatus.LOADING,\n ],\n (isBatchSellTradeAvailable, batchSellTrades, batchFees, isLoading) => {\n return {\n totalNetworkFee: batchFees,\n /**\n * Whether the batch sell trades have been fetched and transactions are ready to be submitted\n */\n isBatchSellTradeAvailable:\n isBatchSellTradeAvailable &&\n Boolean(batchSellTrades?.transactions?.length),\n isLoading,\n };\n },\n);\n\nexport const selectMinimumBalanceForRentExemptionInSOL = (\n state: BridgeAppState,\n) =>\n new BigNumber(state.minimumBalanceForRentExemptionInLamports ?? 0)\n .div(10 ** 9)\n .toString();\n\nexport const selectTokenWarnings = (state: BridgeAppState) =>\n state.tokenWarnings;\n\nexport const selectDefaultSlippagePercentage = createBridgeSelector(\n [\n (state) => selectBridgeFeatureFlags(state).chains,\n (_, slippageParams: Parameters<typeof getDefaultSlippagePercentage>[0]) =>\n slippageParams.srcTokenAddress,\n (_, slippageParams: Parameters<typeof getDefaultSlippagePercentage>[0]) =>\n slippageParams.destTokenAddress,\n (_, slippageParams: Parameters<typeof getDefaultSlippagePercentage>[0]) =>\n slippageParams.srcChainId\n ? formatChainIdToCaip(slippageParams.srcChainId)\n : undefined,\n (_, slippageParams: Parameters<typeof getDefaultSlippagePercentage>[0]) =>\n slippageParams.destChainId\n ? formatChainIdToCaip(slippageParams.destChainId)\n : undefined,\n ],\n (\n featureFlagsByChain,\n srcTokenAddress,\n destTokenAddress,\n srcChainId,\n destChainId,\n ) => {\n return getDefaultSlippagePercentage(\n {\n srcTokenAddress,\n destTokenAddress,\n srcChainId,\n destChainId,\n },\n srcChainId ? featureFlagsByChain[srcChainId]?.stablecoins : undefined,\n destChainId ? featureFlagsByChain[destChainId]?.stablecoins : undefined,\n );\n },\n);\n"]}
|
|
1
|
+
{"version":3,"file":"selectors.mjs","sourceRoot":"","sources":["../src/selectors.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,OAAO,EAAE,UAAU,EAAE,+BAA+B;AAWpD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,wBAAwB;AACxE,OAAO,EAAE,SAAS,EAAE,qBAAqB;;;AAEzC,OAAO,EACL,cAAc,IAAI,eAAe,EACjC,wBAAwB,IAAI,yBAAyB,EACtD,iBAAiB;AAElB,OAAO,EAAE,6BAA6B,EAAE,+BAA2B;AAEnE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,oBAAgB;AACnD,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,e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CAAC,CAAC,SAAS,EACrE,WAAW,CAAC,CAAC,CAAC,mBAAmB,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,SAAS,CACxE,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\nimport { getAddress } from '@ethersproject/address';\nimport type {\n CurrencyRateState,\n MultichainAssetsRatesControllerState,\n TokenRatesControllerState,\n} from '@metamask/assets-controllers';\nimport type {\n GasFeeEstimates,\n GasFeeEstimatesByChainId,\n} from '@metamask/gas-fee-controller';\nimport type { CaipAssetType } from '@metamask/utils';\nimport { isStrictHexString, parseCaipAssetType } from '@metamask/utils';\nimport { BigNumber } from 'bignumber.js';\nimport { orderBy } from 'lodash';\nimport {\n createSelector as createSelector_,\n createStructuredSelector as createStructuredSelector_,\n} from 'reselect';\n\nimport { BRIDGE_PREFERRED_GAS_ESTIMATE } from './constants/bridge';\nimport type { BridgeControllerState, ExchangeRate } from './types';\nimport { RequestStatus, SortOrder } from './types';\nimport {\n getNativeAssetForChainId,\n isNativeAddress,\n isNonEvmChainId,\n} from './utils/bridge';\nimport {\n formatAddressToAssetId,\n formatAddressToCaipReference,\n formatChainIdToCaip,\n formatChainIdToHex,\n} from './utils/caip-formatters';\nimport { processFeatureFlags } from './utils/feature-flags';\nimport { calcBatchFees } from './utils/quote-metadata/calculators';\nimport { calcQuoteMetadata } from './utils/quote-metadata/calculators';\nimport { mergeQuoteMetadata } from './utils/quote-metadata/merge';\nimport type {\n QuoteMetadata,\n TokenAmountValues,\n} from './utils/quote-metadata/types';\nimport { getDefaultSlippagePercentage } from './utils/slippage';\nimport type { QuoteResponseV1 } from './validators/quote-response-v1';\n\n/**\n * The controller states that provide exchange rates\n */\ntype ExchangeRateControllerState = MultichainAssetsRatesControllerState &\n TokenRatesControllerState &\n CurrencyRateState &\n Pick<BridgeControllerState, 'assetExchangeRates'>;\n/**\n * The state of the bridge controller and all its dependency controllers\n */\ntype RemoteFeatureFlagControllerState = {\n remoteFeatureFlags: {\n bridgeConfig: unknown;\n };\n};\n\n/**\n * Minimal shape required for exchange-rate lookups (used by getExchangeRateByChainIdAndAddress).\n * Uses types from assets-controllers; marketData and conversionRates also accept the bridge format.\n */\nexport type ExchangeRateSourcesForLookup = Pick<\n BridgeControllerState,\n 'assetExchangeRates'\n> &\n Partial<Pick<CurrencyRateState, 'currencyRates'>> & {\n marketData?:\n | TokenRatesControllerState['marketData']\n | Record<string, Record<string, { price?: number; currency?: string }>>;\n conversionRates?:\n | MultichainAssetsRatesControllerState['conversionRates']\n | Record<string, { rate: string }>;\n };\n\nexport type BridgeAppState = BridgeControllerState & {\n gasFeeEstimatesByChainId: GasFeeEstimatesByChainId;\n} & ExchangeRateControllerState & {\n participateInMetaMetrics: boolean;\n } & RemoteFeatureFlagControllerState;\n/**\n * Creates a structured selector for the bridge controller\n */\nconst createStructuredBridgeSelector =\n createStructuredSelector_.withTypes<BridgeAppState>();\n/**\n * Creates a typed selector for the bridge controller\n */\nconst createBridgeSelector = createSelector_.withTypes<BridgeAppState>();\n/**\n * Required parameters that clients must provide for the bridge quotes selector\n */\ntype BridgeQuotesClientParams = {\n sortOrder: SortOrder;\n selectedQuote: (QuoteResponseV1 & QuoteMetadata) | null;\n};\n\ntype EvmTokenExchangeRate = { price?: number; currency?: string };\ntype EvmTokenExchangeRates = Record<string, EvmTokenExchangeRate>;\n\nconst createFeatureFlagsSelector =\n createSelector_.withTypes<RemoteFeatureFlagControllerState>();\n\n/**\n * Selects the bridge feature flags\n *\n * @param state - The state of the bridge controller\n * @returns The bridge feature flags\n *\n * @example\n * ```ts\n * const featureFlags = useSelector(state => selectBridgeFeatureFlags(state));\n *\n * Or\n *\n * export const selectBridgeFeatureFlags = createSelector(\n * selectRemoteFeatureFlags,\n * (remoteFeatureFlags) =>\n * selectBridgeFeatureFlagsBase({\n * bridgeConfig: remoteFeatureFlags.bridgeConfig,\n * }),\n * );\n * ```\n */\nexport const selectBridgeFeatureFlags = createFeatureFlagsSelector(\n [(state) => state.remoteFeatureFlags.bridgeConfig],\n (bridgeConfig: unknown) => processFeatureFlags(bridgeConfig),\n);\n\nconst getEvmTokenExchangeRateForAddress = (\n evmTokenExchangeRates: EvmTokenExchangeRates | undefined,\n address: string,\n): EvmTokenExchangeRate | null | undefined => {\n try {\n return isStrictHexString(address)\n ? (evmTokenExchangeRates?.[getAddress(address)] ??\n evmTokenExchangeRates?.[address.toLowerCase()])\n : null;\n } catch {\n return null;\n }\n};\n\n/**\n * Selects the asset exchange rate for a given chain and address\n *\n * @param exchangeRateSources - the controller states containing the exchange rates\n * @param assetId - the assetId to get the exchange rate for\n * @returns The asset exchange rate for the given assetId\n */\nexport const selectExchangeRateByAssetId = (\n exchangeRateSources: ExchangeRateSourcesForLookup,\n assetId?: CaipAssetType,\n): ExchangeRate => {\n if (!assetId) {\n return {};\n }\n\n const { assetExchangeRates, currencyRates, marketData, conversionRates } =\n exchangeRateSources;\n\n // If the asset exchange rate is available in the bridge controller, use it\n // This is defined if the token's rate is not available from the assets controllers\n const bridgeControllerRate =\n assetExchangeRates?.[assetId.toLowerCase() as CaipAssetType] ??\n assetExchangeRates?.[assetId];\n if (\n bridgeControllerRate?.exchangeRate &&\n bridgeControllerRate?.usdExchangeRate\n ) {\n return bridgeControllerRate;\n }\n\n const { chainId } = parseCaipAssetType(assetId);\n\n // If the chain is a non-EVM chain, use the conversion rate from the multichain assets controller\n if (isNonEvmChainId(chainId)) {\n const conversionRatesByKey = conversionRates as\n | Record<string, { rate?: string }>\n | undefined;\n const multichainAssetExchangeRate = conversionRatesByKey?.[assetId];\n const rate = multichainAssetExchangeRate?.rate;\n if (rate) {\n // The multichain rate is denominated in the user's selected currency.\n // To get a USD rate, find the user's-currency-to-USD conversion factor from any EVM native currency rate.\n const nativeCurrencyRate = Object.values(currencyRates ?? {}).find(\n (rateEntry) =>\n rateEntry?.conversionRate !== undefined &&\n rateEntry?.conversionRate !== null &&\n rateEntry?.usdConversionRate !== undefined &&\n rateEntry?.usdConversionRate !== null,\n );\n const usersCurrencyToUsdRate =\n nativeCurrencyRate?.conversionRate !== undefined &&\n nativeCurrencyRate?.conversionRate !== null &&\n nativeCurrencyRate?.usdConversionRate !== undefined &&\n nativeCurrencyRate?.usdConversionRate !== null\n ? new BigNumber(nativeCurrencyRate.usdConversionRate).div(\n nativeCurrencyRate.conversionRate,\n )\n : undefined;\n const usdExchangeRate = usersCurrencyToUsdRate\n ? new BigNumber(rate).times(usersCurrencyToUsdRate).toString()\n : undefined;\n return {\n exchangeRate: rate,\n usdExchangeRate,\n };\n }\n return {};\n }\n\n const address = formatAddressToCaipReference(assetId);\n\n // If the chain is an EVM chain, use the conversion rate from the currency rates controller\n if (isNativeAddress(address)) {\n const { symbol } = getNativeAssetForChainId(chainId);\n const evmNativeExchangeRate = currencyRates?.[symbol];\n if (evmNativeExchangeRate) {\n return {\n exchangeRate: evmNativeExchangeRate.conversionRate?.toString(),\n usdExchangeRate: evmNativeExchangeRate.usdConversionRate?.toString(),\n };\n }\n return {};\n }\n // If the chain is an EVM chain and the asset is not the native asset, use the conversion rate from the token rates controller\n if (!isNonEvmChainId(chainId)) {\n const marketDataByChain =\n (marketData as Record<string, EvmTokenExchangeRates> | undefined) ?? {};\n const evmTokenExchangeRates =\n marketDataByChain[formatChainIdToHex(chainId)];\n const evmTokenExchangeRateForAddress = getEvmTokenExchangeRateForAddress(\n evmTokenExchangeRates,\n address,\n );\n const currencyKey = evmTokenExchangeRateForAddress?.currency;\n const nativeCurrencyRate =\n currencyKey !== undefined && currencyKey !== null\n ? currencyRates?.[currencyKey]\n : undefined;\n const price = evmTokenExchangeRateForAddress?.price;\n // A missing or zero price is not a usable exchange rate. Returning a \"0\"\n // rate here is harmful in two ways: it surfaces a $0 fiat value, and it\n // makes `selectIsAssetExchangeRateInState` treat the token as already\n // priced (the non-empty \"0\" string is truthy), which prevents the\n // controller from fetching the real rate. Fall through to `{}` instead so\n // the rate gets fetched from the price API.\n if (price && nativeCurrencyRate) {\n return {\n exchangeRate: new BigNumber(price)\n .multipliedBy(nativeCurrencyRate.conversionRate ?? 0)\n .toString(),\n usdExchangeRate: new BigNumber(price)\n .multipliedBy(nativeCurrencyRate.usdConversionRate ?? 0)\n .toString(),\n };\n }\n }\n\n return {};\n};\n\n/**\n * Checks whether an exchange rate is available for a given assetId\n *\n * @param state The state of the bridge controller and its dependency controllers\n * @param assetId The assetId to check\n * @returns Whether an exchange rate is available for the given chain and address\n */\nexport const selectIsAssetExchangeRateInState = (\n state: ExchangeRateSourcesForLookup,\n assetId?: CaipAssetType,\n) =>\n Boolean(selectExchangeRateByAssetId(state, assetId)?.exchangeRate) &&\n Boolean(selectExchangeRateByAssetId(state, assetId)?.usdExchangeRate);\n\n/**\n * Selects the gas fee estimates from the gas fee controller. All potential networks\n * support EIP1559 gas fees so assume that gasFeeEstimates is of type GasFeeEstimates\n *\n * @param state - The state of the bridge controller and its dependency controllers\n * @param state.gasFeeEstimatesByChainId - gasEstimates by Hex ChainId\n * @param state.quotes - Fetched bridge/swap quotes\n * @returns The gas fee estimates in decGWEI\n */\nconst selectBridgeFeesPerGas = createBridgeSelector(\n [\n (state) => state.gasFeeEstimatesByChainId,\n (state) => state.quotes?.[0]?.quote.srcChainId,\n ],\n (gasFeeEstimatesByChainId, srcChainId) => {\n if (!srcChainId) {\n return null;\n }\n if (isNonEvmChainId(srcChainId)) {\n return null;\n }\n // @ts-expect-error - all supported networks use this type of estimates\n const gasFeeEstimates: GasFeeEstimates | undefined =\n gasFeeEstimatesByChainId?.[\n formatChainIdToHex(srcChainId) as keyof typeof gasFeeEstimatesByChainId\n ]?.gasFeeEstimates;\n if (!gasFeeEstimates) {\n return null;\n }\n return {\n estimatedBaseFeeInDecGwei: gasFeeEstimates.estimatedBaseFee,\n feePerGasInDecGwei:\n gasFeeEstimates[BRIDGE_PREFERRED_GAS_ESTIMATE]?.suggestedMaxFeePerGas,\n maxFeePerGasInDecGwei: gasFeeEstimates.high?.suggestedMaxFeePerGas,\n };\n },\n);\n\nconst selectExchangeRateSources = createStructuredBridgeSelector({\n currencyRates: (state) => state.currencyRates,\n marketData: (state) => state.marketData,\n conversionRates: (state) => state.conversionRates,\n assetExchangeRates: (state) => state.assetExchangeRates,\n});\n\n// Selects metadata for cross-chain swap quotes\nconst selectMetadata = createBridgeSelector(\n [\n ({ quotes }) => quotes,\n selectBridgeFeesPerGas,\n selectExchangeRateSources,\n ({ quoteRequest }) => quoteRequest,\n ],\n (quotes, bridgeFeesPerGas, exchangeRateSources, quoteRequest) => {\n const { destTokenAddress, srcChainId, destChainId } = quoteRequest[0] ?? {};\n\n return quotes.map((quote) =>\n calcQuoteMetadata(quote, {\n srcTokenExchangeRate: selectExchangeRateByAssetId(\n exchangeRateSources,\n quote.quote.srcAsset.assetId,\n ),\n bridgeFeesPerGas,\n destTokenExchangeRate: selectExchangeRateByAssetId(\n exchangeRateSources,\n formatAddressToAssetId(\n destTokenAddress ?? quote.quote.destAsset.assetId,\n destChainId,\n ),\n ),\n nativeExchangeRate: selectExchangeRateByAssetId(\n exchangeRateSources,\n getNativeAssetForChainId(srcChainId ?? quote.quote.srcChainId)\n ?.assetId,\n ),\n }),\n );\n },\n);\n\n// Selects cross-chain swap quotes including their metadata\nconst selectBridgeQuotesWithMetadata = createBridgeSelector(\n [selectMetadata, ({ quotes }) => quotes],\n (quoteMetadata, quotes) =>\n quotes.map((quote, index) =>\n mergeQuoteMetadata(quote, quoteMetadata[index]),\n ),\n);\n\nconst selectSortedBridgeQuotes = createBridgeSelector(\n [\n selectBridgeQuotesWithMetadata,\n (_, { sortOrder }: BridgeQuotesClientParams) => sortOrder,\n ],\n (quotesWithMetadata, sortOrder): (QuoteResponseV1 & QuoteMetadata)[] => {\n switch (sortOrder) {\n case SortOrder.ETA_ASC:\n return orderBy(\n quotesWithMetadata,\n (quote) => quote.estimatedProcessingTimeInSeconds,\n 'asc',\n );\n default:\n if (quotesWithMetadata.every((quote) => quote?.cost?.valueInCurrency)) {\n return orderBy(\n quotesWithMetadata,\n ({ cost }) => Number(cost?.valueInCurrency),\n 'asc',\n );\n }\n if (\n quotesWithMetadata.every(\n (quote) => quote.quote.priceData?.priceImpact,\n )\n ) {\n return orderBy(\n quotesWithMetadata,\n ({ quote }) => Number(quote.priceData?.priceImpact),\n 'asc',\n );\n }\n return orderBy(\n quotesWithMetadata,\n ({ quote }) => Number(quote.destTokenAmount),\n 'desc',\n );\n }\n },\n);\n\nconst selectRecommendedQuote = createBridgeSelector(\n [selectSortedBridgeQuotes],\n (quotes) => (quotes.length > 0 ? quotes[0] : null),\n);\n\nconst selectActiveQuote = createBridgeSelector(\n [\n selectRecommendedQuote,\n selectSortedBridgeQuotes,\n (_, { selectedQuote }) => selectedQuote,\n ],\n (recommendedQuote, sortedQuotes, selectedQuote) =>\n sortedQuotes.find(\n (quote) => quote.quote.requestId === selectedQuote?.quote.requestId,\n ) ?? recommendedQuote,\n);\n\nconst selectIsQuoteGoingToRefresh = createBridgeSelector(\n [\n selectBridgeFeatureFlags,\n // If at least one quote request is sufficiently funded, continue polling until max refresh count is reached\n (state) =>\n state.quoteRequest.every((quoteRequest) =>\n Boolean(quoteRequest.insufficientBal),\n ),\n (state) => state.quotesRefreshCount,\n ],\n (featureFlags, insufficientBal, quotesRefreshCount) =>\n insufficientBal ? false : featureFlags.maxRefreshCount > quotesRefreshCount,\n);\n\nconst selectQuoteRefreshRate = createBridgeSelector(\n [selectBridgeFeatureFlags, (state) => state.quoteRequest[0]?.srcChainId],\n (featureFlags, srcChainId) =>\n (srcChainId\n ? featureFlags.chains[formatChainIdToCaip(srcChainId)]?.refreshRate\n : featureFlags.refreshRate) ?? featureFlags.refreshRate,\n);\n\nexport const selectIsQuoteExpired = createBridgeSelector(\n [\n selectIsQuoteGoingToRefresh,\n ({ quotesLastFetched }) => quotesLastFetched,\n selectQuoteRefreshRate,\n (_, _ignoredParam, currentTimeInMs: number) => currentTimeInMs,\n ],\n (isQuoteGoingToRefresh, quotesLastFetched, refreshRate, currentTimeInMs) =>\n Boolean(\n !isQuoteGoingToRefresh &&\n quotesLastFetched &&\n currentTimeInMs - quotesLastFetched > refreshRate,\n ),\n);\n\n/**\n * Selects sorted cross-chain swap quotes. By default, the quotes are sorted by cost in ascending order.\n *\n * @param state - The state of the bridge controller and its dependency controllers\n * @param sortOrder - The sort order of the quotes\n * @param selectedQuote - The quote that is currently selected by the user, should be cleared by clients when the req params change\n * @returns The activeQuote, recommendedQuote, sortedQuotes, and other quote fetching metadata\n *\n * @example\n * ```ts\n * const quotes = useSelector(state => selectBridgeQuotes(\n * { ...state.metamask, bridgeConfig: remoteFeatureFlags.bridgeConfig },\n * {\n * sortOrder: state.bridge.sortOrder,\n * selectedQuote: state.bridge.selectedQuote,\n * }\n * ));\n * ```\n */\nexport const selectBridgeQuotes = createStructuredBridgeSelector({\n sortedQuotes: selectSortedBridgeQuotes,\n recommendedQuote: selectRecommendedQuote,\n activeQuote: selectActiveQuote,\n quotesLastFetchedMs: (state) => state.quotesLastFetched,\n isLoading: (state) => state.quotesLoadingStatus === RequestStatus.LOADING,\n quoteFetchError: (state) => state.quoteFetchError,\n quotesRefreshCount: (state) => state.quotesRefreshCount,\n quotesInitialLoadTimeMs: (state) => state.quotesInitialLoadTime,\n isQuoteGoingToRefresh: selectIsQuoteGoingToRefresh,\n});\n\nconst selectRecommendedQuotes = createBridgeSelector(\n [\n selectSortedBridgeQuotes,\n (_, { requestCount }: { requestCount: number }) => requestCount,\n ],\n (quotes, requestCount) =>\n quotes.reduce((acc, quote) => {\n const requestIndex = quote.quoteRequestIndex ?? 0;\n acc[requestIndex] ??= quote;\n return acc;\n }, Array<(QuoteResponseV1 & QuoteMetadata) | null>(requestCount).fill(null)),\n);\n\nconst selectMetadataSum = createBridgeSelector(\n [\n selectRecommendedQuotes,\n (\n _,\n {\n key,\n }: { key: 'totalNetworkFee' | 'minToTokenAmount' | 'toTokenAmount' },\n ) => key,\n ],\n (recommendedQuotes, key) =>\n recommendedQuotes.reduce<TokenAmountValues>(\n (acc, quote) => {\n acc.usd = new BigNumber(acc.usd)\n .plus(quote?.[key]?.usd ?? 0)\n .toString();\n acc.valueInCurrency = new BigNumber(acc.valueInCurrency)\n .plus(quote?.[key]?.valueInCurrency ?? 0)\n .toString();\n acc.amount = new BigNumber(acc.amount)\n .plus(quote?.[key]?.amount ?? 0)\n .toString();\n return acc;\n },\n { usd: '0', valueInCurrency: '0', amount: '0' },\n ),\n);\n\n/**\n * Selects the recommended swap quotes for a batch of quote requests.\n *\n * @param state - The state of the bridge controller and its dependency controllers\n * @param sortOrder - The sort order of the quotes\n * @param requestCount - The number of quote requests fetched in the batch\n * @returns The quotes for multiple quote requests, including their recommendedQuotes,\n * totalReceived, minimumReceived, totalNetworkFee, and other quote fetching metadata.\n *\n * @example\n * ```ts\n * const quotes = useSelector(state => selectBatchSellQuotes(\n * { ...state.metamask },\n * {\n * sortOrder: state.bridge.sortOrder,\n * requestCount: 4,\n * }\n * ));\n * ```\n */\nexport const selectBatchSellQuotes = createStructuredBridgeSelector({\n recommendedQuotes: selectRecommendedQuotes,\n totalReceived: (state, opts) =>\n selectMetadataSum(state, { ...opts, key: 'toTokenAmount' }),\n minimumReceived: (state, opts) =>\n selectMetadataSum(state, { ...opts, key: 'minToTokenAmount' }),\n quotesLastFetchedMs: (state) => state.quotesLastFetched,\n isLoading: (state) => state.quotesLoadingStatus === RequestStatus.LOADING,\n quoteFetchError: (state) => state.quoteFetchError,\n quotesRefreshCount: (state) => state.quotesRefreshCount,\n quotesInitialLoadTimeMs: (state) => state.quotesInitialLoadTime,\n isQuoteGoingToRefresh: selectIsQuoteGoingToRefresh,\n});\n\nconst selectBatchSellFees = createBridgeSelector(\n [\n (state) => state.batchSellTrades?.fee?.amount,\n (state) => state.batchSellTrades?.fee?.asset,\n (state) =>\n selectExchangeRateByAssetId(\n state,\n state.batchSellTrades?.fee?.asset?.assetId,\n ),\n ],\n (feeAmount, feeAsset, exchangeRate) => {\n return feeAmount && feeAsset && exchangeRate\n ? calcBatchFees(feeAmount, feeAsset, exchangeRate)\n : undefined;\n },\n);\n\n/**\n * Selects the batch transactions and fees for a batch of quotes\n *\n * @param state - The state of the bridge controller and its dependency controllers\n * @returns The total transaction fees and whether the batch sell trades are submittable.\n *\n * @example\n * ```ts\n * const { totalNetworkFee, isBatchSellTradeAvailable } = useSelector(state => selectBatchSellTrades(state.metamask));\n * ```\n */\nexport const selectBatchSellTrades = createBridgeSelector(\n [\n (state) => state.batchSellTradesLoadingStatus === RequestStatus.FETCHED,\n (state) => state.batchSellTrades,\n selectBatchSellFees,\n (state) => state.batchSellTradesLoadingStatus === RequestStatus.LOADING,\n ],\n (isBatchSellTradeAvailable, batchSellTrades, batchFees, isLoading) => {\n return {\n totalNetworkFee: batchFees,\n /**\n * Whether the batch sell trades have been fetched and transactions are ready to be submitted\n */\n isBatchSellTradeAvailable:\n isBatchSellTradeAvailable &&\n Boolean(batchSellTrades?.transactions?.length),\n isLoading,\n };\n },\n);\n\nexport const selectMinimumBalanceForRentExemptionInSOL = (\n state: BridgeAppState,\n) =>\n new BigNumber(state.minimumBalanceForRentExemptionInLamports ?? 0)\n .div(10 ** 9)\n .toString();\n\nexport const selectTokenWarnings = (state: BridgeAppState) =>\n state.tokenWarnings;\n\nexport const selectDefaultSlippagePercentage = createBridgeSelector(\n [\n (state) => selectBridgeFeatureFlags(state).chains,\n (_, slippageParams: Parameters<typeof getDefaultSlippagePercentage>[0]) =>\n slippageParams.srcTokenAddress,\n (_, slippageParams: Parameters<typeof getDefaultSlippagePercentage>[0]) =>\n slippageParams.destTokenAddress,\n (_, slippageParams: Parameters<typeof getDefaultSlippagePercentage>[0]) =>\n slippageParams.srcChainId\n ? formatChainIdToCaip(slippageParams.srcChainId)\n : undefined,\n (_, slippageParams: Parameters<typeof getDefaultSlippagePercentage>[0]) =>\n slippageParams.destChainId\n ? formatChainIdToCaip(slippageParams.destChainId)\n : undefined,\n ],\n (\n featureFlagsByChain,\n srcTokenAddress,\n destTokenAddress,\n srcChainId,\n destChainId,\n ) => {\n return getDefaultSlippagePercentage(\n {\n srcTokenAddress,\n destTokenAddress,\n srcChainId,\n destChainId,\n },\n srcChainId ? featureFlagsByChain[srcChainId]?.stablecoins : undefined,\n destChainId ? featureFlagsByChain[destChainId]?.stablecoins : undefined,\n );\n },\n);\n"]}
|
package/dist/types.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAuDA;;GAEG;AACH,IAAY,SAYX;AAZD,WAAY,SAAS;IACnB,4DAA4D;IAC5D,8BAAiB,CAAA;IACjB,qBAAqB;IACrB,4BAAe,CAAA;IACf,kCAAkC;IAClC,wBAAW,CAAA;IACX;;;OAGG;IACH,gCAAmB,CAAA;AACrB,CAAC,EAZW,SAAS,yBAAT,SAAS,QAYpB;AA2BD;;GAEG;AACH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,wCAA2B,CAAA;AAC7B,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAmED,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,sCAAuB,CAAA;IACvB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;AACvB,CAAC,EANW,WAAW,2BAAX,WAAW,QAMtB;AAsDD,IAAY,OAqBX;AArBD,WAAY,OAAO;IACjB,mCAAO,CAAA;IACP,8CAAa,CAAA;IACb,oCAAQ,CAAA;IACR,6CAAa,CAAA;IACb,2CAAY,CAAA;IACZ,wCAAW,CAAA;IACX,iDAAgB,CAAA;IAChB,mDAAiB,CAAA;IACjB,2CAAa,CAAA;IACb,wDAAyB,CAAA;IACzB,gDAAoB,CAAA;IACpB,4FAA4F;IAC5F,wDAAwB,CAAA;IACxB,6CAAgB,CAAA;IAChB,sCAAU,CAAA;IACV,yCAAW,CAAA;IACX,+CAAc,CAAA;IACd,8CAAc,CAAA;IACd,sCAAU,CAAA;IACV,kDAAgB,CAAA;AAClB,CAAC,EArBW,OAAO,uBAAP,OAAO,QAqBlB;AAQD,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,uDAAW,CAAA;IACX,uDAAW,CAAA;IACX,mDAAS,CAAA;AACX,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport type { AccountsControllerGetAccountByAddressAction } from '@metamask/accounts-controller';\nimport type { AssetsControllerGetExchangeRatesForBridgeAction } from '@metamask/assets-controller';\nimport type {\n CurrencyRateControllerGetStateAction,\n MultichainAssetsRatesControllerGetStateAction,\n TokenRatesControllerGetStateAction,\n} from '@metamask/assets-controllers';\nimport type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n} from '@metamask/base-controller';\nimport type { Messenger } from '@metamask/messenger';\nimport type {\n NetworkControllerFindNetworkClientIdByChainIdAction,\n NetworkControllerGetNetworkClientByIdAction,\n} from '@metamask/network-controller';\nimport type { AuthenticationControllerGetBearerTokenAction } from '@metamask/profile-sync-controller/auth';\nimport type { RemoteFeatureFlagControllerGetStateAction } from '@metamask/remote-feature-flag-controller';\nimport type { SnapControllerHandleRequestAction } from '@metamask/snaps-controllers';\nimport type { Infer } from '@metamask/superstruct';\nimport type {\n CaipAccountId,\n CaipAssetId,\n CaipAssetType,\n CaipChainId,\n Hex,\n} from '@metamask/utils';\n\nimport type { BridgeController } from './bridge-controller';\nimport type { BridgeControllerMethodActions } from './bridge-controller-method-action-types';\nimport type { BRIDGE_CONTROLLER_NAME } from './constants/bridge';\nimport type { SimulatedGasFeeLimitsSchema } from './validators/batch-sell';\nimport type { BatchSellTradesResponseSchema } from './validators/batch-sell';\nimport type {\n ChainConfigurationSchema,\n ChainRankingSchema,\n PlatformConfigSchema,\n} from './validators/feature-flags';\nimport type { IntentSchema } from './validators/intent';\nimport type { TxFeeGasLimitsSchema } from './validators/quote';\nimport type { FeeDataSchema } from './validators/quote';\nimport type { GaslessPropertiesSchema } from './validators/quote';\nimport type { QuoteResponse } from './validators/quote-response';\nimport type { QuoteResponseV1 } from './validators/quote-response-v1';\nimport type { QuoteStreamCompleteSchema } from './validators/quote-stream-complete';\nimport type { StepSchema } from './validators/step';\nimport type { TokenFeatureSchema } from './validators/token-feature';\n\nexport type FetchFunction = (\n input: RequestInfo | URL | string,\n init?: RequestInit,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n) => Promise<any>;\n\n/**\n * The types of assets that a user can send\n */\nexport enum AssetType {\n /** The native asset for the current network, such as ETH */\n native = 'NATIVE',\n /** An ERC20 token */\n token = 'TOKEN',\n /** An ERC721 or ERC1155 token. */\n NFT = 'NFT',\n /**\n * A transaction interacting with a contract that isn't a token method\n * interaction will be marked as dealing with an unknown asset type.\n */\n unknown = 'UNKNOWN',\n}\n\nexport type ChainConfiguration = Infer<typeof ChainConfigurationSchema>;\n\nexport type ChainRanking = Infer<typeof ChainRankingSchema>;\n\n/**\n * @deprecated Avoid introducing new usages and use the QuoteResponseV2 feeData.network value instead\n */\nexport type L1GasFees = {\n l1GasFeesInHexWei?: Hex; // l1 fees for approval and trade in hex wei, appended by BridgeController.#appendL1GasFees\n};\n\n/**\n * @deprecated Avoid introducing new usages and use the QuoteResponseV2 feeData.network value instead\n */\nexport type NonEvmFees = {\n nonEvmFeesInNative?: string; // Non-EVM chain fees in native units (SOL for Solana, BTC for Bitcoin)\n};\n\nexport type InputPrimaryDenomination = 'token_amount' | 'fiat_value';\n\n/**\n * Asset exchange rate values for a given chain and address\n */\nexport type ExchangeRate = { exchangeRate?: string; usdExchangeRate?: string };\n\n/**\n * Sort order set by the user\n */\nexport enum SortOrder {\n COST_ASC = 'cost_ascending',\n ETA_ASC = 'time_descending',\n}\n\n/**\n * This is the interface for the token object used in the extension client\n * In addition to the {@link BridgeAsset} fields, it includes balance information\n */\nexport type BridgeToken = {\n address: string;\n symbol: string;\n image: string;\n decimals: number;\n chainId: number | Hex | ChainId | CaipChainId;\n balance: string; // raw balance\n // TODO deprecate this field and use balance instead\n string: string | undefined; // normalized balance as a stringified number\n tokenFiatAmount?: number | null;\n occurrences?: number;\n};\n\ntype DecimalChainId = string;\nexport type GasMultiplierByChainId = Record<DecimalChainId, number>;\n\nexport type FeatureFlagResponse = Infer<typeof PlatformConfigSchema>;\n\n// TODO move definition to validators.ts\n/**\n * This is the interface for the quote request sent to the bridge-api\n * and should only be used by the fetchBridgeQuotes utility function\n * Components and redux stores should use the {@link GenericQuoteRequest} type\n */\nexport type QuoteRequest<\n ChainIdType = ChainId | number,\n TokenAddressType = string,\n WalletAddressType = string,\n> = {\n walletAddress: WalletAddressType;\n destWalletAddress?: WalletAddressType;\n srcChainId: ChainIdType;\n destChainId: ChainIdType;\n srcTokenAddress: TokenAddressType;\n destTokenAddress: TokenAddressType;\n /**\n * This is the amount sent, in atomic amount\n */\n srcTokenAmount: string;\n slippage?: number;\n aggIds?: string[];\n bridgeIds?: string[];\n insufficientBal?: boolean;\n resetApproval?: boolean;\n refuel?: boolean;\n /**\n * Whether the response should include gasless swap quotes\n * This should be true if the user has opted in to STX on the client\n * and the current network has STX support\n */\n gasIncluded: boolean;\n /**\n * Whether to request quotes that use EIP-7702 delegated gasless execution\n */\n gasIncluded7702: boolean;\n /**\n * The fee that will be charged by MetaMask\n */\n fee?: number;\n};\n\nexport enum StatusTypes {\n SUBMITTED = 'SUBMITTED',\n UNKNOWN = 'UNKNOWN',\n FAILED = 'FAILED',\n PENDING = 'PENDING',\n COMPLETE = 'COMPLETE',\n}\n\n/**\n * These are types that components pass in. Since data is a mix of types when coming from the redux store, we need to use a generic type that can cover all the types.\n * Payloads with this type are transformed into QuoteRequest by fetchBridgeQuotes right before fetching quotes\n */\nexport type GenericQuoteRequest = QuoteRequest<\n Hex | CaipChainId | string | number, // chainIds\n Hex | CaipAssetId | string, // assetIds/addresses\n Hex | CaipAccountId | string // accountIds/addresses\n>;\n\nexport type Step = Infer<typeof StepSchema>;\n\nexport type RefuelData = Step;\n\nexport type FeeData = Infer<typeof FeeDataSchema>;\n\nexport type Intent = Infer<typeof IntentSchema>;\nexport type IntentOrderLike = Intent['order'];\n\nexport type BatchSellTradesRequest = {\n quotes: QuoteResponseV1[];\n stxEnabled: boolean;\n};\n\n/**\n * This is the bridge-api response for the obtainGaslessBatch method\n */\nexport type BatchSellTradesResponse = Infer<\n typeof BatchSellTradesResponseSchema\n>;\n\nexport type SimulatedGasFeeLimits = Infer<typeof SimulatedGasFeeLimitsSchema>;\nexport type TxFeeGasLimits = Infer<typeof TxFeeGasLimitsSchema>;\n\nexport type GaslessProperties = Infer<typeof GaslessPropertiesSchema>;\n\ntype DeepPartialValue<Type> =\n NonNullable<Type> extends (infer U)[]\n ? DeepPartial<U>[]\n : NonNullable<Type> extends readonly (infer U)[]\n ? readonly DeepPartial<U>[]\n : NonNullable<Type> extends object\n ? DeepPartial<NonNullable<Type>>\n : Type;\nexport type DeepPartial<Type> = Type extends string\n ? Type\n : {\n [K in keyof Type]?: null extends Type[K]\n ? DeepPartialValue<Type[K]> | null\n : DeepPartialValue<Type[K]>;\n };\n\nexport enum ChainId {\n ETH = 1,\n OPTIMISM = 10,\n BSC = 56,\n POLYGON = 137,\n ZKSYNC = 324,\n BASE = 8453,\n ARBITRUM = 42161,\n AVALANCHE = 43114,\n LINEA = 59144,\n SOLANA = 1151111081099710,\n BTC = 20000000000001,\n /** Internal bridge / token-list id for Stellar pubnet (Token API chain: stellar:pubnet). */\n STELLAR = 20000000000002,\n TRON = 728126428,\n SEI = 1329,\n MONAD = 143,\n HYPEREVM = 999,\n MEGAETH = 4326,\n ARC = 5042,\n ROBINHOOD = 4663,\n}\n\nexport type FeatureFlagsPlatformConfig = Infer<typeof PlatformConfigSchema>;\n\nexport type TokenFeature = Infer<typeof TokenFeatureSchema>;\n\nexport type QuoteStreamCompleteData = Infer<typeof QuoteStreamCompleteSchema>;\n\nexport enum RequestStatus {\n LOADING = 0,\n FETCHED = 1,\n ERROR = 2,\n}\n\nexport type BridgeControllerState = {\n quoteRequest: Partial<GenericQuoteRequest>[];\n quotes: QuoteResponse[];\n /**\n * The time elapsed between the initial quote fetch and when the first valid quote was received\n */\n quotesInitialLoadTime: number | null;\n /**\n * The timestamp of when the latest quote fetch started\n */\n quotesLastFetched: number | null;\n /**\n * The status of the quote fetch, including fee calculations and validations\n * This is set to\n * - LOADING when the quote fetch starts\n * - FETCHED when the process completes successfully, including when quotes are empty\n * - ERROR when any errors occur\n *\n * When SSE is enabled, this is set to LOADING even when a quote is available. It is only\n * set to FETCHED when the stream is closed and all quotes have been received\n */\n quotesLoadingStatus: RequestStatus | null;\n quoteFetchError: string | null;\n /**\n * The number of times the quotes have been refreshed, starts at 0 and is\n * incremented at the end of each quote fetch\n */\n quotesRefreshCount: number;\n /**\n * Asset exchange rates for EVM and multichain assets that are not indexed by the assets controllers\n */\n assetExchangeRates: Record<CaipAssetType, ExchangeRate>;\n /**\n * When the src token is SOL, this needs to be subtracted from their balance to determine\n * the max amount that can be sent.\n */\n minimumBalanceForRentExemptionInLamports: string | null;\n /**\n * Security alerts for the destination token in the current quote request,\n * populated from `token_warning` SSE events.\n */\n tokenWarnings: TokenFeature[];\n /**\n * Client-supplied security classification for the destination token in the\n * current quote request, used as the `token_security_type_destination`\n * analytics property. Set via the `context` arg of\n * `updateBridgeQuoteRequestParams` and reset whenever the quote request is\n * reset. `null` when the client has no security data for the token.\n */\n tokenSecurityTypeDestination: string | null;\n /**\n * The denomination currently shown as the primary source amount input.\n * This is persisted as a user preference so returning to the flow restores\n * the last selected fiat/token display mode.\n */\n inputPrimaryDenomination: InputPrimaryDenomination;\n /**\n * Metadata about the completed quote stream, populated from the `complete` SSE event.\n * Set to null at the start of each fetch and updated when the complete event is received.\n */\n quoteStreamComplete: QuoteStreamCompleteData | null;\n /**\n * Contains gasless transaction data and fees for BatchSell quotes, provided by the obtainGaslessBatch API\n */\n batchSellTrades: BatchSellTradesResponse | null;\n /**\n * The status of the batch sell trades fetch, including fee calculations and validations\n */\n batchSellTradesLoadingStatus: RequestStatus | null;\n};\n\n/**\n * @deprecated Use the separate method action types (e.g.,\n * `BridgeControllerFetchQuotesAction`) instead.\n */\nexport type BridgeControllerAction<\n FunctionName extends keyof BridgeController,\n> = {\n type: `${typeof BRIDGE_CONTROLLER_NAME}:${FunctionName}`;\n handler: BridgeController[FunctionName];\n};\n\nexport type BridgeControllerGetStateAction = ControllerGetStateAction<\n typeof BRIDGE_CONTROLLER_NAME,\n BridgeControllerState\n>;\n\nexport type BridgeControllerStateChangeEvent = ControllerStateChangeEvent<\n typeof BRIDGE_CONTROLLER_NAME,\n BridgeControllerState\n>;\n\nexport type BridgeControllerActions =\n | BridgeControllerGetStateAction\n | BridgeControllerMethodActions;\n\nexport type BridgeControllerEvents = BridgeControllerStateChangeEvent;\n\nexport type AllowedActions =\n | AccountsControllerGetAccountByAddressAction\n | AuthenticationControllerGetBearerTokenAction\n | CurrencyRateControllerGetStateAction\n | TokenRatesControllerGetStateAction\n | MultichainAssetsRatesControllerGetStateAction\n | SnapControllerHandleRequestAction\n | NetworkControllerFindNetworkClientIdByChainIdAction\n | NetworkControllerGetNetworkClientByIdAction\n | RemoteFeatureFlagControllerGetStateAction\n | AssetsControllerGetExchangeRatesForBridgeAction;\nexport type AllowedEvents = never;\n\n/**\n * The messenger for the BridgeController.\n */\nexport type BridgeControllerMessenger = Messenger<\n typeof BRIDGE_CONTROLLER_NAME,\n BridgeControllerActions | AllowedActions,\n BridgeControllerEvents | AllowedEvents\n>;\n"]}
|
|
1
|
+
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAuDA;;GAEG;AACH,IAAY,SAYX;AAZD,WAAY,SAAS;IACnB,4DAA4D;IAC5D,8BAAiB,CAAA;IACjB,qBAAqB;IACrB,4BAAe,CAAA;IACf,kCAAkC;IAClC,wBAAW,CAAA;IACX;;;OAGG;IACH,gCAAmB,CAAA;AACrB,CAAC,EAZW,SAAS,yBAAT,SAAS,QAYpB;AA2BD;;GAEG;AACH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,wCAA2B,CAAA;AAC7B,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAyED,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,sCAAuB,CAAA;IACvB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;AACvB,CAAC,EANW,WAAW,2BAAX,WAAW,QAMtB;AAsDD,IAAY,OAqBX;AArBD,WAAY,OAAO;IACjB,mCAAO,CAAA;IACP,8CAAa,CAAA;IACb,oCAAQ,CAAA;IACR,6CAAa,CAAA;IACb,2CAAY,CAAA;IACZ,wCAAW,CAAA;IACX,iDAAgB,CAAA;IAChB,mDAAiB,CAAA;IACjB,2CAAa,CAAA;IACb,wDAAyB,CAAA;IACzB,gDAAoB,CAAA;IACpB,4FAA4F;IAC5F,wDAAwB,CAAA;IACxB,6CAAgB,CAAA;IAChB,sCAAU,CAAA;IACV,yCAAW,CAAA;IACX,+CAAc,CAAA;IACd,8CAAc,CAAA;IACd,sCAAU,CAAA;IACV,kDAAgB,CAAA;AAClB,CAAC,EArBW,OAAO,uBAAP,OAAO,QAqBlB;AAQD,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,uDAAW,CAAA;IACX,uDAAW,CAAA;IACX,mDAAS,CAAA;AACX,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport type { AccountsControllerGetAccountByAddressAction } from '@metamask/accounts-controller';\nimport type { AssetsControllerGetExchangeRatesForBridgeAction } from '@metamask/assets-controller';\nimport type {\n CurrencyRateControllerGetStateAction,\n MultichainAssetsRatesControllerGetStateAction,\n TokenRatesControllerGetStateAction,\n} from '@metamask/assets-controllers';\nimport type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n} from '@metamask/base-controller';\nimport type { Messenger } from '@metamask/messenger';\nimport type {\n NetworkControllerFindNetworkClientIdByChainIdAction,\n NetworkControllerGetNetworkClientByIdAction,\n} from '@metamask/network-controller';\nimport type { AuthenticationControllerGetBearerTokenAction } from '@metamask/profile-sync-controller/auth';\nimport type { RemoteFeatureFlagControllerGetStateAction } from '@metamask/remote-feature-flag-controller';\nimport type { SnapControllerHandleRequestAction } from '@metamask/snaps-controllers';\nimport type { Infer } from '@metamask/superstruct';\nimport type {\n CaipAccountId,\n CaipAssetId,\n CaipAssetType,\n CaipChainId,\n Hex,\n} from '@metamask/utils';\n\nimport type { BridgeController } from './bridge-controller';\nimport type { BridgeControllerMethodActions } from './bridge-controller-method-action-types';\nimport type { BRIDGE_CONTROLLER_NAME } from './constants/bridge';\nimport type { SimulatedGasFeeLimitsSchema } from './validators/batch-sell';\nimport type { BatchSellTradesResponseSchema } from './validators/batch-sell';\nimport type { BridgeAssetSchema } from './validators/bridge-asset';\nimport type {\n ChainConfigurationSchema,\n ChainRankingSchema,\n PlatformConfigSchema,\n} from './validators/feature-flags';\nimport type { IntentSchema } from './validators/intent';\nimport type { TxFeeGasLimitsSchema } from './validators/quote';\nimport type { FeeDataSchema } from './validators/quote';\nimport type { GaslessPropertiesSchema } from './validators/quote';\nimport type { QuoteResponseV1 } from './validators/quote-response-v1';\nimport type { QuoteStreamCompleteSchema } from './validators/quote-stream-complete';\nimport type { StepSchema } from './validators/step';\nimport type { TokenFeatureSchema } from './validators/token-feature';\n\nexport type FetchFunction = (\n input: RequestInfo | URL | string,\n init?: RequestInit,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n) => Promise<any>;\n\n/**\n * The types of assets that a user can send\n */\nexport enum AssetType {\n /** The native asset for the current network, such as ETH */\n native = 'NATIVE',\n /** An ERC20 token */\n token = 'TOKEN',\n /** An ERC721 or ERC1155 token. */\n NFT = 'NFT',\n /**\n * A transaction interacting with a contract that isn't a token method\n * interaction will be marked as dealing with an unknown asset type.\n */\n unknown = 'UNKNOWN',\n}\n\nexport type ChainConfiguration = Infer<typeof ChainConfigurationSchema>;\n\nexport type ChainRanking = Infer<typeof ChainRankingSchema>;\n\n/**\n * @deprecated Avoid introducing new usages and use the QuoteResponseV2 feeData.network value instead\n */\nexport type L1GasFees = {\n l1GasFeesInHexWei?: Hex; // l1 fees for approval and trade in hex wei, appended by BridgeController.#appendL1GasFees\n};\n\n/**\n * @deprecated Avoid introducing new usages and use the QuoteResponseV2 feeData.network value instead\n */\nexport type NonEvmFees = {\n nonEvmFeesInNative?: string; // Non-EVM chain fees in native units (SOL for Solana, BTC for Bitcoin)\n};\n\nexport type InputPrimaryDenomination = 'token_amount' | 'fiat_value';\n\n/**\n * Asset exchange rate values for a given chain and address\n */\nexport type ExchangeRate = { exchangeRate?: string; usdExchangeRate?: string };\n\n/**\n * Sort order set by the user\n */\nexport enum SortOrder {\n COST_ASC = 'cost_ascending',\n ETA_ASC = 'time_descending',\n}\n\n/**\n * This is the interface for the asset object returned by the bridge-api\n * This type is used in the QuoteResponse and in the fetchBridgeTokens response\n */\nexport type BridgeAsset = Infer<typeof BridgeAssetSchema>;\n\n/**\n * This is the interface for the token object used in the extension client\n * In addition to the {@link BridgeAsset} fields, it includes balance information\n */\nexport type BridgeToken = {\n address: string;\n symbol: string;\n image: string;\n decimals: number;\n chainId: number | Hex | ChainId | CaipChainId;\n balance: string; // raw balance\n // TODO deprecate this field and use balance instead\n string: string | undefined; // normalized balance as a stringified number\n tokenFiatAmount?: number | null;\n occurrences?: number;\n};\n\ntype DecimalChainId = string;\nexport type GasMultiplierByChainId = Record<DecimalChainId, number>;\n\nexport type FeatureFlagResponse = Infer<typeof PlatformConfigSchema>;\n\n// TODO move definition to validators.ts\n/**\n * This is the interface for the quote request sent to the bridge-api\n * and should only be used by the fetchBridgeQuotes utility function\n * Components and redux stores should use the {@link GenericQuoteRequest} type\n */\nexport type QuoteRequest<\n ChainIdType = ChainId | number,\n TokenAddressType = string,\n WalletAddressType = string,\n> = {\n walletAddress: WalletAddressType;\n destWalletAddress?: WalletAddressType;\n srcChainId: ChainIdType;\n destChainId: ChainIdType;\n srcTokenAddress: TokenAddressType;\n destTokenAddress: TokenAddressType;\n /**\n * This is the amount sent, in atomic amount\n */\n srcTokenAmount: string;\n slippage?: number;\n aggIds?: string[];\n bridgeIds?: string[];\n insufficientBal?: boolean;\n resetApproval?: boolean;\n refuel?: boolean;\n /**\n * Whether the response should include gasless swap quotes\n * This should be true if the user has opted in to STX on the client\n * and the current network has STX support\n */\n gasIncluded: boolean;\n /**\n * Whether to request quotes that use EIP-7702 delegated gasless execution\n */\n gasIncluded7702: boolean;\n /**\n * The fee that will be charged by MetaMask\n */\n fee?: number;\n};\n\nexport enum StatusTypes {\n SUBMITTED = 'SUBMITTED',\n UNKNOWN = 'UNKNOWN',\n FAILED = 'FAILED',\n PENDING = 'PENDING',\n COMPLETE = 'COMPLETE',\n}\n\n/**\n * These are types that components pass in. Since data is a mix of types when coming from the redux store, we need to use a generic type that can cover all the types.\n * Payloads with this type are transformed into QuoteRequest by fetchBridgeQuotes right before fetching quotes\n */\nexport type GenericQuoteRequest = QuoteRequest<\n Hex | CaipChainId | string | number, // chainIds\n Hex | CaipAssetId | string, // assetIds/addresses\n Hex | CaipAccountId | string // accountIds/addresses\n>;\n\nexport type Step = Infer<typeof StepSchema>;\n\nexport type RefuelData = Step;\n\nexport type FeeData = Infer<typeof FeeDataSchema>;\n\nexport type Intent = Infer<typeof IntentSchema>;\nexport type IntentOrderLike = Intent['order'];\n\nexport type BatchSellTradesRequest = {\n quotes: QuoteResponseV1[];\n stxEnabled: boolean;\n};\n\n/**\n * This is the bridge-api response for the obtainGaslessBatch method\n */\nexport type BatchSellTradesResponse = Infer<\n typeof BatchSellTradesResponseSchema\n>;\n\nexport type SimulatedGasFeeLimits = Infer<typeof SimulatedGasFeeLimitsSchema>;\nexport type TxFeeGasLimits = Infer<typeof TxFeeGasLimitsSchema>;\n\nexport type GaslessProperties = Infer<typeof GaslessPropertiesSchema>;\n\ntype DeepPartialValue<Type> =\n NonNullable<Type> extends (infer U)[]\n ? DeepPartial<U>[]\n : NonNullable<Type> extends readonly (infer U)[]\n ? readonly DeepPartial<U>[]\n : NonNullable<Type> extends object\n ? DeepPartial<NonNullable<Type>>\n : Type;\nexport type DeepPartial<Type> = Type extends string\n ? Type\n : {\n [K in keyof Type]?: null extends Type[K]\n ? DeepPartialValue<Type[K]> | null\n : DeepPartialValue<Type[K]>;\n };\n\nexport enum ChainId {\n ETH = 1,\n OPTIMISM = 10,\n BSC = 56,\n POLYGON = 137,\n ZKSYNC = 324,\n BASE = 8453,\n ARBITRUM = 42161,\n AVALANCHE = 43114,\n LINEA = 59144,\n SOLANA = 1151111081099710,\n BTC = 20000000000001,\n /** Internal bridge / token-list id for Stellar pubnet (Token API chain: stellar:pubnet). */\n STELLAR = 20000000000002,\n TRON = 728126428,\n SEI = 1329,\n MONAD = 143,\n HYPEREVM = 999,\n MEGAETH = 4326,\n ARC = 5042,\n ROBINHOOD = 4663,\n}\n\nexport type FeatureFlagsPlatformConfig = Infer<typeof PlatformConfigSchema>;\n\nexport type TokenFeature = Infer<typeof TokenFeatureSchema>;\n\nexport type QuoteStreamCompleteData = Infer<typeof QuoteStreamCompleteSchema>;\n\nexport enum RequestStatus {\n LOADING = 0,\n FETCHED = 1,\n ERROR = 2,\n}\n\nexport type BridgeControllerState = {\n quoteRequest: Partial<GenericQuoteRequest>[];\n quotes: (QuoteResponseV1 & L1GasFees & NonEvmFees)[];\n /**\n * The time elapsed between the initial quote fetch and when the first valid quote was received\n */\n quotesInitialLoadTime: number | null;\n /**\n * The timestamp of when the latest quote fetch started\n */\n quotesLastFetched: number | null;\n /**\n * The status of the quote fetch, including fee calculations and validations\n * This is set to\n * - LOADING when the quote fetch starts\n * - FETCHED when the process completes successfully, including when quotes are empty\n * - ERROR when any errors occur\n *\n * When SSE is enabled, this is set to LOADING even when a quote is available. It is only\n * set to FETCHED when the stream is closed and all quotes have been received\n */\n quotesLoadingStatus: RequestStatus | null;\n quoteFetchError: string | null;\n /**\n * The number of times the quotes have been refreshed, starts at 0 and is\n * incremented at the end of each quote fetch\n */\n quotesRefreshCount: number;\n /**\n * Asset exchange rates for EVM and multichain assets that are not indexed by the assets controllers\n */\n assetExchangeRates: Record<CaipAssetType, ExchangeRate>;\n /**\n * When the src token is SOL, this needs to be subtracted from their balance to determine\n * the max amount that can be sent.\n */\n minimumBalanceForRentExemptionInLamports: string | null;\n /**\n * Security alerts for the destination token in the current quote request,\n * populated from `token_warning` SSE events.\n */\n tokenWarnings: TokenFeature[];\n /**\n * Client-supplied security classification for the destination token in the\n * current quote request, used as the `token_security_type_destination`\n * analytics property. Set via the `context` arg of\n * `updateBridgeQuoteRequestParams` and reset whenever the quote request is\n * reset. `null` when the client has no security data for the token.\n */\n tokenSecurityTypeDestination: string | null;\n /**\n * The denomination currently shown as the primary source amount input.\n * This is persisted as a user preference so returning to the flow restores\n * the last selected fiat/token display mode.\n */\n inputPrimaryDenomination: InputPrimaryDenomination;\n /**\n * Metadata about the completed quote stream, populated from the `complete` SSE event.\n * Set to null at the start of each fetch and updated when the complete event is received.\n */\n quoteStreamComplete: QuoteStreamCompleteData | null;\n /**\n * Contains gasless transaction data and fees for BatchSell quotes, provided by the obtainGaslessBatch API\n */\n batchSellTrades: BatchSellTradesResponse | null;\n /**\n * The status of the batch sell trades fetch, including fee calculations and validations\n */\n batchSellTradesLoadingStatus: RequestStatus | null;\n};\n\n/**\n * @deprecated Use the separate method action types (e.g.,\n * `BridgeControllerFetchQuotesAction`) instead.\n */\nexport type BridgeControllerAction<\n FunctionName extends keyof BridgeController,\n> = {\n type: `${typeof BRIDGE_CONTROLLER_NAME}:${FunctionName}`;\n handler: BridgeController[FunctionName];\n};\n\nexport type BridgeControllerGetStateAction = ControllerGetStateAction<\n typeof BRIDGE_CONTROLLER_NAME,\n BridgeControllerState\n>;\n\nexport type BridgeControllerStateChangeEvent = ControllerStateChangeEvent<\n typeof BRIDGE_CONTROLLER_NAME,\n BridgeControllerState\n>;\n\nexport type BridgeControllerActions =\n | BridgeControllerGetStateAction\n | BridgeControllerMethodActions;\n\nexport type BridgeControllerEvents = BridgeControllerStateChangeEvent;\n\nexport type AllowedActions =\n | AccountsControllerGetAccountByAddressAction\n | AuthenticationControllerGetBearerTokenAction\n | CurrencyRateControllerGetStateAction\n | TokenRatesControllerGetStateAction\n | MultichainAssetsRatesControllerGetStateAction\n | SnapControllerHandleRequestAction\n | NetworkControllerFindNetworkClientIdByChainIdAction\n | NetworkControllerGetNetworkClientByIdAction\n | RemoteFeatureFlagControllerGetStateAction\n | AssetsControllerGetExchangeRatesForBridgeAction;\nexport type AllowedEvents = never;\n\n/**\n * The messenger for the BridgeController.\n */\nexport type BridgeControllerMessenger = Messenger<\n typeof BRIDGE_CONTROLLER_NAME,\n BridgeControllerActions | AllowedActions,\n BridgeControllerEvents | AllowedEvents\n>;\n"]}
|
package/dist/types.d.cts
CHANGED
|
@@ -14,12 +14,12 @@ import type { BridgeControllerMethodActions } from "./bridge-controller-method-a
|
|
|
14
14
|
import type { BRIDGE_CONTROLLER_NAME } from "./constants/bridge.cjs";
|
|
15
15
|
import type { SimulatedGasFeeLimitsSchema } from "./validators/batch-sell.cjs";
|
|
16
16
|
import type { BatchSellTradesResponseSchema } from "./validators/batch-sell.cjs";
|
|
17
|
+
import type { BridgeAssetSchema } from "./validators/bridge-asset.cjs";
|
|
17
18
|
import type { ChainConfigurationSchema, ChainRankingSchema, PlatformConfigSchema } from "./validators/feature-flags.cjs";
|
|
18
19
|
import type { IntentSchema } from "./validators/intent.cjs";
|
|
19
20
|
import type { TxFeeGasLimitsSchema } from "./validators/quote.cjs";
|
|
20
21
|
import type { FeeDataSchema } from "./validators/quote.cjs";
|
|
21
22
|
import type { GaslessPropertiesSchema } from "./validators/quote.cjs";
|
|
22
|
-
import type { QuoteResponse } from "./validators/quote-response.cjs";
|
|
23
23
|
import type { QuoteResponseV1 } from "./validators/quote-response-v1.cjs";
|
|
24
24
|
import type { QuoteStreamCompleteSchema } from "./validators/quote-stream-complete.cjs";
|
|
25
25
|
import type { StepSchema } from "./validators/step.cjs";
|
|
@@ -70,6 +70,11 @@ export declare enum SortOrder {
|
|
|
70
70
|
COST_ASC = "cost_ascending",
|
|
71
71
|
ETA_ASC = "time_descending"
|
|
72
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* This is the interface for the asset object returned by the bridge-api
|
|
75
|
+
* This type is used in the QuoteResponse and in the fetchBridgeTokens response
|
|
76
|
+
*/
|
|
77
|
+
export type BridgeAsset = Infer<typeof BridgeAssetSchema>;
|
|
73
78
|
/**
|
|
74
79
|
* This is the interface for the token object used in the extension client
|
|
75
80
|
* In addition to the {@link BridgeAsset} fields, it includes balance information
|
|
@@ -193,7 +198,7 @@ export declare enum RequestStatus {
|
|
|
193
198
|
}
|
|
194
199
|
export type BridgeControllerState = {
|
|
195
200
|
quoteRequest: Partial<GenericQuoteRequest>[];
|
|
196
|
-
quotes:
|
|
201
|
+
quotes: (QuoteResponseV1 & L1GasFees & NonEvmFees)[];
|
|
197
202
|
/**
|
|
198
203
|
* The time elapsed between the initial quote fetch and when the first valid quote was received
|
|
199
204
|
*/
|
package/dist/types.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2CAA2C,EAAE,sCAAsC;AACjG,OAAO,KAAK,EAAE,+CAA+C,EAAE,oCAAoC;AACnG,OAAO,KAAK,EACV,oCAAoC,EACpC,6CAA6C,EAC7C,kCAAkC,EACnC,qCAAqC;AACtC,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC3B,kCAAkC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,4BAA4B;AACrD,OAAO,KAAK,EACV,mDAAmD,EACnD,2CAA2C,EAC5C,qCAAqC;AACtC,OAAO,KAAK,EAAE,4CAA4C,EAAE,+CAA+C;AAC3G,OAAO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