@metamask-previews/bridge-status-controller 64.3.0-preview-cb897e9 → 64.4.1-preview-8a4f4ea3
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 +13 -1
- package/dist/utils/gas.cjs +2 -1
- package/dist/utils/gas.cjs.map +1 -1
- package/dist/utils/gas.d.cts.map +1 -1
- package/dist/utils/gas.d.mts.map +1 -1
- package/dist/utils/gas.mjs +2 -1
- package/dist/utils/gas.mjs.map +1 -1
- package/dist/utils/transaction.d.cts +96 -0
- package/dist/utils/transaction.d.cts.map +1 -1
- package/dist/utils/transaction.d.mts +96 -0
- package/dist/utils/transaction.d.mts.map +1 -1
- package/dist/utils/validators.d.cts +96 -0
- package/dist/utils/validators.d.cts.map +1 -1
- package/dist/utils/validators.d.mts +96 -0
- package/dist/utils/validators.d.mts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,12 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [64.4.1]
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Use `BRIDGE_PREFERRED_GAS_ESTIMATE` from `@metamask/bridge-controller` for gas price estimates to align with validation ([#7582](https://github.com/MetaMask/core/pull/7582))
|
|
15
|
+
|
|
16
|
+
## [64.4.0]
|
|
17
|
+
|
|
10
18
|
### Added
|
|
11
19
|
|
|
12
20
|
- Add intent based transaction support ([#6547](https://github.com/MetaMask/core/pull/6547))
|
|
13
21
|
|
|
14
22
|
### Changed
|
|
15
23
|
|
|
24
|
+
- Bump `@metamask/transaction-controller` from `^62.7.0` to `^62.8.0` ([#7596](https://github.com/MetaMask/core/pull/7596))
|
|
25
|
+
- Bump `@metamask/bridge-controller` from `^64.3.0` to `^64.4.0` ([#7596](https://github.com/MetaMask/core/pull/7596))
|
|
16
26
|
- Bump `@metamask/controller-utils` from `^11.17.0` to `^11.18.0` ([#7583](https://github.com/MetaMask/core/pull/7583))
|
|
17
27
|
- Bump `@metamask/network-controller` from `^27.1.0` to `^27.2.0` ([#7583](https://github.com/MetaMask/core/pull/7583))
|
|
18
28
|
|
|
@@ -849,7 +859,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
849
859
|
|
|
850
860
|
- Initial release ([#5317](https://github.com/MetaMask/core/pull/5317))
|
|
851
861
|
|
|
852
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@64.
|
|
862
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@64.4.1...HEAD
|
|
863
|
+
[64.4.1]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@64.4.0...@metamask/bridge-status-controller@64.4.1
|
|
864
|
+
[64.4.0]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@64.3.0...@metamask/bridge-status-controller@64.4.0
|
|
853
865
|
[64.3.0]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@64.2.0...@metamask/bridge-status-controller@64.3.0
|
|
854
866
|
[64.2.0]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@64.1.0...@metamask/bridge-status-controller@64.2.0
|
|
855
867
|
[64.1.0]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@64.0.1...@metamask/bridge-status-controller@64.1.0
|
package/dist/utils/gas.cjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.calcActualGasUsed = exports.calculateGasFees = exports.getTxGasEstimates = void 0;
|
|
4
|
+
const bridge_controller_1 = require("@metamask/bridge-controller");
|
|
4
5
|
const controller_utils_1 = require("@metamask/controller-utils");
|
|
5
6
|
const bignumber_js_1 = require("bignumber.js");
|
|
6
7
|
const getTransaction1559GasFeeEstimates = (txGasFeeEstimates, estimatedBaseFee) => {
|
|
7
|
-
const { maxFeePerGas, maxPriorityFeePerGas } = txGasFeeEstimates?.
|
|
8
|
+
const { maxFeePerGas, maxPriorityFeePerGas } = txGasFeeEstimates?.[bridge_controller_1.BRIDGE_PREFERRED_GAS_ESTIMATE] ?? {};
|
|
8
9
|
const baseAndPriorityFeePerGas = maxPriorityFeePerGas
|
|
9
10
|
? new bignumber_js_1.BigNumber(estimatedBaseFee, 10)
|
|
10
11
|
.times(10 ** 9)
|
package/dist/utils/gas.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gas.cjs","sourceRoot":"","sources":["../../src/utils/gas.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"gas.cjs","sourceRoot":"","sources":["../../src/utils/gas.ts"],"names":[],"mappings":";;;AAAA,mEAA4E;AAE5E,iEAAmD;AAWnD,+CAAyC;AAOzC,MAAM,iCAAiC,GAAG,CACxC,iBAA2C,EAC3C,gBAAwB,EACxB,EAAE;IACF,MAAM,EAAE,YAAY,EAAE,oBAAoB,EAAE,GAC1C,iBAAiB,EAAE,CAAC,iDAA6B,CAAC,IAAI,EAAE,CAAC;IAE3D,MAAM,wBAAwB,GAAG,oBAAoB;QACnD,CAAC,CAAC,IAAI,wBAAS,CAAC,gBAAgB,EAAE,EAAE,CAAC;aAChC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;aACd,IAAI,CAAC,oBAAoB,EAAE,EAAE,CAAC;QACnC,CAAC,CAAC,SAAS,CAAC;IAEd,OAAO;QACL,wBAAwB;QACxB,YAAY;QACZ,oBAAoB;KACrB,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;GAOG;AACI,MAAM,iBAAiB,GAAG,CAAC,EAChC,iBAAiB,EACjB,sBAAsB,GAMvB,EAAE,EAAE;IACH,MAAM,EAAE,gBAAgB,GAAG,GAAG,EAAE,GAAG,sBAAyC,CAAC;IAC7E,OAAO,iCAAi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A,iBAAiB,qBAiC5B","sourcesContent":["import { BRIDGE_PREFERRED_GAS_ESTIMATE } from '@metamask/bridge-controller';\nimport type { TokenAmountValues, TxData } from '@metamask/bridge-controller';\nimport { toHex } from '@metamask/controller-utils';\nimport type {\n GasFeeEstimates,\n GasFeeState,\n} from '@metamask/gas-fee-controller';\nimport type {\n FeeMarketGasFeeEstimates,\n TransactionController,\n TransactionReceipt,\n} from '@metamask/transaction-controller';\nimport type { Hex } from '@metamask/utils';\nimport { BigNumber } from 'bignumber.js';\n\nimport type {\n BridgeHistoryItem,\n BridgeStatusControllerMessenger,\n} from '../types';\n\nconst getTransaction1559GasFeeEstimates = (\n txGasFeeEstimates: FeeMarketGasFeeEstimates,\n estimatedBaseFee: string,\n) => {\n const { maxFeePerGas, maxPriorityFeePerGas } =\n txGasFeeEstimates?.[BRIDGE_PREFERRED_GAS_ESTIMATE] ?? {};\n\n const baseAndPriorityFeePerGas = maxPriorityFeePerGas\n ? new BigNumber(estimatedBaseFee, 10)\n .times(10 ** 9)\n .plus(maxPriorityFeePerGas, 16)\n : undefined;\n\n return {\n baseAndPriorityFeePerGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n };\n};\n\n/**\n * Get the gas fee estimates for a transaction\n *\n * @param params - The parameters for the gas fee estimates\n * @param params.txGasFeeEstimates - The gas fee estimates for the transaction (TransactionController)\n * @param params.networkGasFeeEstimates - The gas fee estimates for the network (GasFeeController)\n * @returns The gas fee estimates for the transaction\n */\nexport const getTxGasEstimates = ({\n txGasFeeEstimates,\n networkGasFeeEstimates,\n}: {\n txGasFeeEstimates: Awaited<\n ReturnType<TransactionController['estimateGasFee']>\n >['estimates'];\n networkGasFeeEstimates: GasFeeState['gasFeeEstimates'];\n}) => {\n const { estimatedBaseFee = '0' } = networkGasFeeEstimates as GasFeeEstimates;\n return getTransaction1559GasFeeEstimates(\n txGasFeeEstimates as unknown as FeeMarketGasFeeEstimates,\n estimatedBaseFee,\n );\n};\n\nexport const calculateGasFees = async (\n disable7702: boolean,\n messenger: BridgeStatusControllerMessenger,\n estimateGasFeeFn: typeof TransactionController.prototype.estimateGasFee,\n { chainId: _, gasLimit, ...trade }: TxData,\n networkClientId: string,\n chainId: Hex,\n txFee?: { maxFeePerGas: string; maxPriorityFeePerGas: string },\n) => {\n if (!disable7702) {\n return {};\n }\n if (txFee) {\n return { ...txFee, gas: gasLimit?.toString() };\n }\n const transactionParams = {\n ...trade,\n gas: gasLimit?.toString(),\n data: trade.data as `0x${string}`,\n to: trade.to as `0x${string}`,\n value: trade.value as `0x${string}`,\n };\n const { gasFeeEstimates } = messenger.call('GasFeeController:getState');\n const { estimates: txGasFeeEstimates } = await estimateGasFeeFn({\n transactionParams,\n chainId,\n networkClientId,\n });\n const { maxFeePerGas, maxPriorityFeePerGas } = getTxGasEstimates({\n networkGasFeeEstimates: gasFeeEstimates,\n txGasFeeEstimates,\n });\n const maxGasLimit = toHex(transactionParams.gas ?? 0);\n\n return {\n maxFeePerGas,\n maxPriorityFeePerGas,\n gas: maxGasLimit,\n };\n};\n\nconst calcGasInHexWei = (gasLimit?: string, gasPrice?: string) => {\n return gasLimit && gasPrice\n ? new BigNumber(gasLimit, 16).times(new BigNumber(gasPrice, 16))\n : null;\n};\n\n/**\n * Calculate the effective gas used for a transaction and its approval tx\n *\n * @param bridgeHistoryItem - The bridge history item\n * @param bridgeHistoryItem.pricingData - pricing data from the submitted quote\n * @param txReceipt - tx receipt from the txMeta\n * @param approvalTxReceipt - tx receipt from the approvalTxMeta\n * @returns The actual gas used for the transaction in Wei and its value in USD\n */\nexport const calcActualGasUsed = (\n { pricingData }: BridgeHistoryItem,\n txReceipt?: TransactionReceipt,\n approvalTxReceipt?: TransactionReceipt,\n): Omit<TokenAmountValues, 'valueInCurrency'> | null => {\n const usdExchangeRate =\n pricingData?.quotedGasInUsd && pricingData?.quotedGasAmount\n ? new BigNumber(pricingData?.quotedGasInUsd).div(\n pricingData.quotedGasAmount,\n )\n : null;\n\n const actualGasInHexWei = calcGasInHexWei(\n txReceipt?.gasUsed,\n txReceipt?.effectiveGasPrice,\n )?.plus(\n calcGasInHexWei(\n approvalTxReceipt?.gasUsed,\n approvalTxReceipt?.effectiveGasPrice,\n ) ?? 0,\n );\n\n const actualGasInDecEth = actualGasInHexWei\n ?.div(new BigNumber(10).pow(18))\n .toString(10);\n\n return actualGasInHexWei && actualGasInDecEth\n ? {\n amount: actualGasInHexWei.toString(10),\n usd:\n usdExchangeRate?.multipliedBy(actualGasInDecEth).toString(10) ?? null,\n }\n : null;\n};\n"]}
|
package/dist/utils/gas.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gas.d.cts","sourceRoot":"","sources":["../../src/utils/gas.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gas.d.cts","sourceRoot":"","sources":["../../src/utils/gas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,oCAAoC;AAE7E,OAAO,KAAK,EAEV,WAAW,EACZ,qCAAqC;AACtC,OAAO,KAAK,EAEV,qBAAqB,EACrB,kBAAkB,EACnB,yCAAyC;AAC1C,OAAO,KAAK,EAAE,GAAG,EAAE,wBAAwB;AAC3C,OAAO,EAAE,SAAS,EAAE,qBAAqB;AAEzC,OAAO,KAAK,EACV,iBAAiB,EACjB,+BAA+B,EAChC,qBAAiB;AAsBlB;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB;uBAIT,QACjB,WAAW,qBAAqB,CAAC,gBAAgB,CAAC,CAAC,CACpD,CAAC,WAAW,CAAC;4BACU,WAAW,CAAC,iBAAiB,CAAC;;;;;CAOvD,CAAC;AAEF,eAAO,MAAM,gBAAgB,gBACd,OAAO,gEAEF,OAAO,sBAAsB,SAAS,CAAC,cAAc,sCACnC,MAAM,mBACzB,MAAM,WACd,GAAG,UACJ;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,oBAAoB,EAAE,MAAM,CAAA;CAAE,gBAgC/D,CAAC;AAQF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,oBACX,iBAAiB,cACtB,kBAAkB,sBACV,kBAAkB,KACrC,KAAK,iBAAiB,EAAE,iBAAiB,CAAC,GAAG,IA6B/C,CAAC"}
|
package/dist/utils/gas.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gas.d.mts","sourceRoot":"","sources":["../../src/utils/gas.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gas.d.mts","sourceRoot":"","sources":["../../src/utils/gas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,oCAAoC;AAE7E,OAAO,KAAK,EAEV,WAAW,EACZ,qCAAqC;AACtC,OAAO,KAAK,EAEV,qBAAqB,EACrB,kBAAkB,EACnB,yCAAyC;AAC1C,OAAO,KAAK,EAAE,GAAG,EAAE,wBAAwB;AAC3C,OAAO,EAAE,SAAS,EAAE,qBAAqB;AAEzC,OAAO,KAAK,EACV,iBAAiB,EACjB,+BAA+B,EAChC,qBAAiB;AAsBlB;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB;uBAIT,QACjB,WAAW,qBAAqB,CAAC,gBAAgB,CAAC,CAAC,CACpD,CAAC,WAAW,CAAC;4BACU,WAAW,CAAC,iBAAiB,CAAC;;;;;CAOvD,CAAC;AAEF,eAAO,MAAM,gBAAgB,gBACd,OAAO,gEAEF,OAAO,sBAAsB,SAAS,CAAC,cAAc,sCACnC,MAAM,mBACzB,MAAM,WACd,GAAG,UACJ;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,oBAAoB,EAAE,MAAM,CAAA;CAAE,gBAgC/D,CAAC;AAQF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,oBACX,iBAAiB,cACtB,kBAAkB,sBACV,kBAAkB,KACrC,KAAK,iBAAiB,EAAE,iBAAiB,CAAC,GAAG,IA6B/C,CAAC"}
|
package/dist/utils/gas.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { BRIDGE_PREFERRED_GAS_ESTIMATE } from "@metamask/bridge-controller";
|
|
1
2
|
import { toHex } from "@metamask/controller-utils";
|
|
2
3
|
import { BigNumber } from "bignumber.js";
|
|
3
4
|
const getTransaction1559GasFeeEstimates = (txGasFeeEstimates, estimatedBaseFee) => {
|
|
4
|
-
const { maxFeePerGas, maxPriorityFeePerGas } = txGasFeeEstimates?.
|
|
5
|
+
const { maxFeePerGas, maxPriorityFeePerGas } = txGasFeeEstimates?.[BRIDGE_PREFERRED_GAS_ESTIMATE] ?? {};
|
|
5
6
|
const baseAndPriorityFeePerGas = maxPriorityFeePerGas
|
|
6
7
|
? new BigNumber(estimatedBaseFee, 10)
|
|
7
8
|
.times(10 ** 9)
|
package/dist/utils/gas.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gas.mjs","sourceRoot":"","sources":["../../src/utils/gas.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gas.mjs","sourceRoot":"","sources":["../../src/utils/gas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,oCAAoC;AAE5E,OAAO,EAAE,KAAK,EAAE,mCAAmC;AAWnD,OAAO,EAAE,SAAS,EAAE,qBAAqB;AAOzC,MAAM,iCAAiC,GAAG,CACxC,iBAA2C,EAC3C,gBAAwB,EACxB,EAAE;IACF,MAAM,EAAE,YAAY,EAAE,oBAAoB,EAAE,GAC1C,iBAAiB,EAAE,CAAC,6BAA6B,CAAC,IAAI,EAAE,CAAC;IAE3D,MAAM,wBAAwB,GAAG,oBAAoB;QACnD,CAAC,CAAC,IAAI,SAAS,CAAC,gBAAgB,EAAE,EAAE,CAAC;aAChC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;aACd,IAAI,CAAC,oBAAoB,EAAE,EAAE,CAAC;QACnC,CAAC,CAAC,SAAS,CAAC;IAEd,OAAO;QACL,wB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,iBAAiB,CAAC,QAAQ,CAAC,EAAE,CAAC;YACtC,GAAG,EACD,eAAe,EAAE,YAAY,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,IAAI;SACxE;QACH,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC","sourcesContent":["import { BRIDGE_PREFERRED_GAS_ESTIMATE } from '@metamask/bridge-controller';\nimport type { TokenAmountValues, TxData } from '@metamask/bridge-controller';\nimport { toHex } from '@metamask/controller-utils';\nimport type {\n GasFeeEstimates,\n GasFeeState,\n} from '@metamask/gas-fee-controller';\nimport type {\n FeeMarketGasFeeEstimates,\n TransactionController,\n TransactionReceipt,\n} from '@metamask/transaction-controller';\nimport type { Hex } from '@metamask/utils';\nimport { BigNumber } from 'bignumber.js';\n\nimport type {\n BridgeHistoryItem,\n BridgeStatusControllerMessenger,\n} from '../types';\n\nconst getTransaction1559GasFeeEstimates = (\n txGasFeeEstimates: FeeMarketGasFeeEstimates,\n estimatedBaseFee: string,\n) => {\n const { maxFeePerGas, maxPriorityFeePerGas } =\n txGasFeeEstimates?.[BRIDGE_PREFERRED_GAS_ESTIMATE] ?? {};\n\n const baseAndPriorityFeePerGas = maxPriorityFeePerGas\n ? new BigNumber(estimatedBaseFee, 10)\n .times(10 ** 9)\n .plus(maxPriorityFeePerGas, 16)\n : undefined;\n\n return {\n baseAndPriorityFeePerGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n };\n};\n\n/**\n * Get the gas fee estimates for a transaction\n *\n * @param params - The parameters for the gas fee estimates\n * @param params.txGasFeeEstimates - The gas fee estimates for the transaction (TransactionController)\n * @param params.networkGasFeeEstimates - The gas fee estimates for the network (GasFeeController)\n * @returns The gas fee estimates for the transaction\n */\nexport const getTxGasEstimates = ({\n txGasFeeEstimates,\n networkGasFeeEstimates,\n}: {\n txGasFeeEstimates: Awaited<\n ReturnType<TransactionController['estimateGasFee']>\n >['estimates'];\n networkGasFeeEstimates: GasFeeState['gasFeeEstimates'];\n}) => {\n const { estimatedBaseFee = '0' } = networkGasFeeEstimates as GasFeeEstimates;\n return getTransaction1559GasFeeEstimates(\n txGasFeeEstimates as unknown as FeeMarketGasFeeEstimates,\n estimatedBaseFee,\n );\n};\n\nexport const calculateGasFees = async (\n disable7702: boolean,\n messenger: BridgeStatusControllerMessenger,\n estimateGasFeeFn: typeof TransactionController.prototype.estimateGasFee,\n { chainId: _, gasLimit, ...trade }: TxData,\n networkClientId: string,\n chainId: Hex,\n txFee?: { maxFeePerGas: string; maxPriorityFeePerGas: string },\n) => {\n if (!disable7702) {\n return {};\n }\n if (txFee) {\n return { ...txFee, gas: gasLimit?.toString() };\n }\n const transactionParams = {\n ...trade,\n gas: gasLimit?.toString(),\n data: trade.data as `0x${string}`,\n to: trade.to as `0x${string}`,\n value: trade.value as `0x${string}`,\n };\n const { gasFeeEstimates } = messenger.call('GasFeeController:getState');\n const { estimates: txGasFeeEstimates } = await estimateGasFeeFn({\n transactionParams,\n chainId,\n networkClientId,\n });\n const { maxFeePerGas, maxPriorityFeePerGas } = getTxGasEstimates({\n networkGasFeeEstimates: gasFeeEstimates,\n txGasFeeEstimates,\n });\n const maxGasLimit = toHex(transactionParams.gas ?? 0);\n\n return {\n maxFeePerGas,\n maxPriorityFeePerGas,\n gas: maxGasLimit,\n };\n};\n\nconst calcGasInHexWei = (gasLimit?: string, gasPrice?: string) => {\n return gasLimit && gasPrice\n ? new BigNumber(gasLimit, 16).times(new BigNumber(gasPrice, 16))\n : null;\n};\n\n/**\n * Calculate the effective gas used for a transaction and its approval tx\n *\n * @param bridgeHistoryItem - The bridge history item\n * @param bridgeHistoryItem.pricingData - pricing data from the submitted quote\n * @param txReceipt - tx receipt from the txMeta\n * @param approvalTxReceipt - tx receipt from the approvalTxMeta\n * @returns The actual gas used for the transaction in Wei and its value in USD\n */\nexport const calcActualGasUsed = (\n { pricingData }: BridgeHistoryItem,\n txReceipt?: TransactionReceipt,\n approvalTxReceipt?: TransactionReceipt,\n): Omit<TokenAmountValues, 'valueInCurrency'> | null => {\n const usdExchangeRate =\n pricingData?.quotedGasInUsd && pricingData?.quotedGasAmount\n ? new BigNumber(pricingData?.quotedGasInUsd).div(\n pricingData.quotedGasAmount,\n )\n : null;\n\n const actualGasInHexWei = calcGasInHexWei(\n txReceipt?.gasUsed,\n txReceipt?.effectiveGasPrice,\n )?.plus(\n calcGasInHexWei(\n approvalTxReceipt?.gasUsed,\n approvalTxReceipt?.effectiveGasPrice,\n ) ?? 0,\n );\n\n const actualGasInDecEth = actualGasInHexWei\n ?.div(new BigNumber(10).pow(18))\n .toString(10);\n\n return actualGasInHexWei && actualGasInDecEth\n ? {\n amount: actualGasInHexWei.toString(10),\n usd:\n usdExchangeRate?.multipliedBy(actualGasInDecEth).toString(10) ?? null,\n }\n : null;\n};\n"]}
|
|
@@ -21,6 +21,18 @@ export declare const getStatusRequestParams: (quoteResponse: QuoteResponse) => {
|
|
|
21
21
|
decimals: number;
|
|
22
22
|
icon?: string | null | undefined;
|
|
23
23
|
iconUrl?: string | null | undefined;
|
|
24
|
+
rwaData?: {
|
|
25
|
+
instrumentType: string;
|
|
26
|
+
ticker: string;
|
|
27
|
+
market: {
|
|
28
|
+
nextOpen: string;
|
|
29
|
+
nextClose: string;
|
|
30
|
+
};
|
|
31
|
+
nextPause: {
|
|
32
|
+
start: string;
|
|
33
|
+
end: string;
|
|
34
|
+
};
|
|
35
|
+
} | undefined;
|
|
24
36
|
};
|
|
25
37
|
destAsset: {
|
|
26
38
|
symbol: string;
|
|
@@ -31,6 +43,18 @@ export declare const getStatusRequestParams: (quoteResponse: QuoteResponse) => {
|
|
|
31
43
|
decimals: number;
|
|
32
44
|
icon?: string | null | undefined;
|
|
33
45
|
iconUrl?: string | null | undefined;
|
|
46
|
+
rwaData?: {
|
|
47
|
+
instrumentType: string;
|
|
48
|
+
ticker: string;
|
|
49
|
+
market: {
|
|
50
|
+
nextOpen: string;
|
|
51
|
+
nextClose: string;
|
|
52
|
+
};
|
|
53
|
+
nextPause: {
|
|
54
|
+
start: string;
|
|
55
|
+
end: string;
|
|
56
|
+
};
|
|
57
|
+
} | undefined;
|
|
34
58
|
};
|
|
35
59
|
requestId: string;
|
|
36
60
|
srcTokenAmount: string;
|
|
@@ -48,6 +72,18 @@ export declare const getStatusRequestParams: (quoteResponse: QuoteResponse) => {
|
|
|
48
72
|
decimals: number;
|
|
49
73
|
icon?: string | null | undefined;
|
|
50
74
|
iconUrl?: string | null | undefined;
|
|
75
|
+
rwaData?: {
|
|
76
|
+
instrumentType: string;
|
|
77
|
+
ticker: string;
|
|
78
|
+
market: {
|
|
79
|
+
nextOpen: string;
|
|
80
|
+
nextClose: string;
|
|
81
|
+
};
|
|
82
|
+
nextPause: {
|
|
83
|
+
start: string;
|
|
84
|
+
end: string;
|
|
85
|
+
};
|
|
86
|
+
} | undefined;
|
|
51
87
|
};
|
|
52
88
|
};
|
|
53
89
|
txFee?: ({
|
|
@@ -61,6 +97,18 @@ export declare const getStatusRequestParams: (quoteResponse: QuoteResponse) => {
|
|
|
61
97
|
decimals: number;
|
|
62
98
|
icon?: string | null | undefined;
|
|
63
99
|
iconUrl?: string | null | undefined;
|
|
100
|
+
rwaData?: {
|
|
101
|
+
instrumentType: string;
|
|
102
|
+
ticker: string;
|
|
103
|
+
market: {
|
|
104
|
+
nextOpen: string;
|
|
105
|
+
nextClose: string;
|
|
106
|
+
};
|
|
107
|
+
nextPause: {
|
|
108
|
+
start: string;
|
|
109
|
+
end: string;
|
|
110
|
+
};
|
|
111
|
+
} | undefined;
|
|
64
112
|
};
|
|
65
113
|
} & {
|
|
66
114
|
maxFeePerGas: string;
|
|
@@ -81,6 +129,18 @@ export declare const getStatusRequestParams: (quoteResponse: QuoteResponse) => {
|
|
|
81
129
|
decimals: number;
|
|
82
130
|
icon?: string | null | undefined;
|
|
83
131
|
iconUrl?: string | null | undefined;
|
|
132
|
+
rwaData?: {
|
|
133
|
+
instrumentType: string;
|
|
134
|
+
ticker: string;
|
|
135
|
+
market: {
|
|
136
|
+
nextOpen: string;
|
|
137
|
+
nextClose: string;
|
|
138
|
+
};
|
|
139
|
+
nextPause: {
|
|
140
|
+
start: string;
|
|
141
|
+
end: string;
|
|
142
|
+
};
|
|
143
|
+
} | undefined;
|
|
84
144
|
};
|
|
85
145
|
destAsset: {
|
|
86
146
|
symbol: string;
|
|
@@ -91,6 +151,18 @@ export declare const getStatusRequestParams: (quoteResponse: QuoteResponse) => {
|
|
|
91
151
|
decimals: number;
|
|
92
152
|
icon?: string | null | undefined;
|
|
93
153
|
iconUrl?: string | null | undefined;
|
|
154
|
+
rwaData?: {
|
|
155
|
+
instrumentType: string;
|
|
156
|
+
ticker: string;
|
|
157
|
+
market: {
|
|
158
|
+
nextOpen: string;
|
|
159
|
+
nextClose: string;
|
|
160
|
+
};
|
|
161
|
+
nextPause: {
|
|
162
|
+
start: string;
|
|
163
|
+
end: string;
|
|
164
|
+
};
|
|
165
|
+
} | undefined;
|
|
94
166
|
};
|
|
95
167
|
srcAmount: string;
|
|
96
168
|
destAmount: string;
|
|
@@ -113,6 +185,18 @@ export declare const getStatusRequestParams: (quoteResponse: QuoteResponse) => {
|
|
|
113
185
|
decimals: number;
|
|
114
186
|
icon?: string | null | undefined;
|
|
115
187
|
iconUrl?: string | null | undefined;
|
|
188
|
+
rwaData?: {
|
|
189
|
+
instrumentType: string;
|
|
190
|
+
ticker: string;
|
|
191
|
+
market: {
|
|
192
|
+
nextOpen: string;
|
|
193
|
+
nextClose: string;
|
|
194
|
+
};
|
|
195
|
+
nextPause: {
|
|
196
|
+
start: string;
|
|
197
|
+
end: string;
|
|
198
|
+
};
|
|
199
|
+
} | undefined;
|
|
116
200
|
};
|
|
117
201
|
destAsset: {
|
|
118
202
|
symbol: string;
|
|
@@ -123,6 +207,18 @@ export declare const getStatusRequestParams: (quoteResponse: QuoteResponse) => {
|
|
|
123
207
|
decimals: number;
|
|
124
208
|
icon?: string | null | undefined;
|
|
125
209
|
iconUrl?: string | null | undefined;
|
|
210
|
+
rwaData?: {
|
|
211
|
+
instrumentType: string;
|
|
212
|
+
ticker: string;
|
|
213
|
+
market: {
|
|
214
|
+
nextOpen: string;
|
|
215
|
+
nextClose: string;
|
|
216
|
+
};
|
|
217
|
+
nextPause: {
|
|
218
|
+
start: string;
|
|
219
|
+
end: string;
|
|
220
|
+
};
|
|
221
|
+
} | undefined;
|
|
126
222
|
};
|
|
127
223
|
srcAmount: string;
|
|
128
224
|
destAmount: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.d.cts","sourceRoot":"","sources":["../../src/utils/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,sCAAsC;AAS7E,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,KAAK,EACL,MAAM,EACP,oCAAoC;AAErC,OAAO,EAEL,eAAe,EAChB,yCAAyC;AAC1C,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EAChB,yCAAyC;AAQ1C,OAAO,KAAK,EACV,+BAA+B,EAC/B,qBAAqB,EACtB,qBAAiB;AAElB,eAAO,MAAM,gBAAgB,cAAgD,CAAC;AAE9E,eAAO,MAAM,sBAAsB,kBAAmB,aAAa
|
|
1
|
+
{"version":3,"file":"transaction.d.cts","sourceRoot":"","sources":["../../src/utils/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,sCAAsC;AAS7E,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,KAAK,EACL,MAAM,EACP,oCAAoC;AAErC,OAAO,EAEL,eAAe,EAChB,yCAAyC;AAC1C,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EAChB,yCAAyC;AAQ1C,OAAO,KAAK,EACV,+BAA+B,EAC/B,qBAAqB,EACtB,qBAAiB;AAElB,eAAO,MAAM,gBAAgB,cAAgD,CAAC;AAE9E,eAAO,MAAM,sBAAsB,kBAAmB,aAAa;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;;;;CAsBjF,CAAC;AAEF,eAAO,MAAM,eAAe,gBACb,OAAO,mCACa,MAAM;;;;MAMtC,sBAiBF,CAAC;AAEF,eAAO,MAAM,4BAA4B;;gBAoB3B,OAAO;WACZ,MAAM;mBACE,KAAK,aAAa,EAAE,UAAU,GAAG,OAAO,CAAC,GACtD,QAAQ,aAAa,CAAC;sBACN,OAAO,sBAAsB,SAAS,CAAC,cAAc;;;;;;;;;;;;;;;;;;;;iFA0FxE,CAAC;AAEF,eAAO,MAAM,gCAAgC;;yBAOtB,OAAO,sBAAsB,SAAS,CAAC,iBAAiB;aACpE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEhB,CAAC"}
|
|
@@ -21,6 +21,18 @@ export declare const getStatusRequestParams: (quoteResponse: QuoteResponse) => {
|
|
|
21
21
|
decimals: number;
|
|
22
22
|
icon?: string | null | undefined;
|
|
23
23
|
iconUrl?: string | null | undefined;
|
|
24
|
+
rwaData?: {
|
|
25
|
+
instrumentType: string;
|
|
26
|
+
ticker: string;
|
|
27
|
+
market: {
|
|
28
|
+
nextOpen: string;
|
|
29
|
+
nextClose: string;
|
|
30
|
+
};
|
|
31
|
+
nextPause: {
|
|
32
|
+
start: string;
|
|
33
|
+
end: string;
|
|
34
|
+
};
|
|
35
|
+
} | undefined;
|
|
24
36
|
};
|
|
25
37
|
destAsset: {
|
|
26
38
|
symbol: string;
|
|
@@ -31,6 +43,18 @@ export declare const getStatusRequestParams: (quoteResponse: QuoteResponse) => {
|
|
|
31
43
|
decimals: number;
|
|
32
44
|
icon?: string | null | undefined;
|
|
33
45
|
iconUrl?: string | null | undefined;
|
|
46
|
+
rwaData?: {
|
|
47
|
+
instrumentType: string;
|
|
48
|
+
ticker: string;
|
|
49
|
+
market: {
|
|
50
|
+
nextOpen: string;
|
|
51
|
+
nextClose: string;
|
|
52
|
+
};
|
|
53
|
+
nextPause: {
|
|
54
|
+
start: string;
|
|
55
|
+
end: string;
|
|
56
|
+
};
|
|
57
|
+
} | undefined;
|
|
34
58
|
};
|
|
35
59
|
requestId: string;
|
|
36
60
|
srcTokenAmount: string;
|
|
@@ -48,6 +72,18 @@ export declare const getStatusRequestParams: (quoteResponse: QuoteResponse) => {
|
|
|
48
72
|
decimals: number;
|
|
49
73
|
icon?: string | null | undefined;
|
|
50
74
|
iconUrl?: string | null | undefined;
|
|
75
|
+
rwaData?: {
|
|
76
|
+
instrumentType: string;
|
|
77
|
+
ticker: string;
|
|
78
|
+
market: {
|
|
79
|
+
nextOpen: string;
|
|
80
|
+
nextClose: string;
|
|
81
|
+
};
|
|
82
|
+
nextPause: {
|
|
83
|
+
start: string;
|
|
84
|
+
end: string;
|
|
85
|
+
};
|
|
86
|
+
} | undefined;
|
|
51
87
|
};
|
|
52
88
|
};
|
|
53
89
|
txFee?: ({
|
|
@@ -61,6 +97,18 @@ export declare const getStatusRequestParams: (quoteResponse: QuoteResponse) => {
|
|
|
61
97
|
decimals: number;
|
|
62
98
|
icon?: string | null | undefined;
|
|
63
99
|
iconUrl?: string | null | undefined;
|
|
100
|
+
rwaData?: {
|
|
101
|
+
instrumentType: string;
|
|
102
|
+
ticker: string;
|
|
103
|
+
market: {
|
|
104
|
+
nextOpen: string;
|
|
105
|
+
nextClose: string;
|
|
106
|
+
};
|
|
107
|
+
nextPause: {
|
|
108
|
+
start: string;
|
|
109
|
+
end: string;
|
|
110
|
+
};
|
|
111
|
+
} | undefined;
|
|
64
112
|
};
|
|
65
113
|
} & {
|
|
66
114
|
maxFeePerGas: string;
|
|
@@ -81,6 +129,18 @@ export declare const getStatusRequestParams: (quoteResponse: QuoteResponse) => {
|
|
|
81
129
|
decimals: number;
|
|
82
130
|
icon?: string | null | undefined;
|
|
83
131
|
iconUrl?: string | null | undefined;
|
|
132
|
+
rwaData?: {
|
|
133
|
+
instrumentType: string;
|
|
134
|
+
ticker: string;
|
|
135
|
+
market: {
|
|
136
|
+
nextOpen: string;
|
|
137
|
+
nextClose: string;
|
|
138
|
+
};
|
|
139
|
+
nextPause: {
|
|
140
|
+
start: string;
|
|
141
|
+
end: string;
|
|
142
|
+
};
|
|
143
|
+
} | undefined;
|
|
84
144
|
};
|
|
85
145
|
destAsset: {
|
|
86
146
|
symbol: string;
|
|
@@ -91,6 +151,18 @@ export declare const getStatusRequestParams: (quoteResponse: QuoteResponse) => {
|
|
|
91
151
|
decimals: number;
|
|
92
152
|
icon?: string | null | undefined;
|
|
93
153
|
iconUrl?: string | null | undefined;
|
|
154
|
+
rwaData?: {
|
|
155
|
+
instrumentType: string;
|
|
156
|
+
ticker: string;
|
|
157
|
+
market: {
|
|
158
|
+
nextOpen: string;
|
|
159
|
+
nextClose: string;
|
|
160
|
+
};
|
|
161
|
+
nextPause: {
|
|
162
|
+
start: string;
|
|
163
|
+
end: string;
|
|
164
|
+
};
|
|
165
|
+
} | undefined;
|
|
94
166
|
};
|
|
95
167
|
srcAmount: string;
|
|
96
168
|
destAmount: string;
|
|
@@ -113,6 +185,18 @@ export declare const getStatusRequestParams: (quoteResponse: QuoteResponse) => {
|
|
|
113
185
|
decimals: number;
|
|
114
186
|
icon?: string | null | undefined;
|
|
115
187
|
iconUrl?: string | null | undefined;
|
|
188
|
+
rwaData?: {
|
|
189
|
+
instrumentType: string;
|
|
190
|
+
ticker: string;
|
|
191
|
+
market: {
|
|
192
|
+
nextOpen: string;
|
|
193
|
+
nextClose: string;
|
|
194
|
+
};
|
|
195
|
+
nextPause: {
|
|
196
|
+
start: string;
|
|
197
|
+
end: string;
|
|
198
|
+
};
|
|
199
|
+
} | undefined;
|
|
116
200
|
};
|
|
117
201
|
destAsset: {
|
|
118
202
|
symbol: string;
|
|
@@ -123,6 +207,18 @@ export declare const getStatusRequestParams: (quoteResponse: QuoteResponse) => {
|
|
|
123
207
|
decimals: number;
|
|
124
208
|
icon?: string | null | undefined;
|
|
125
209
|
iconUrl?: string | null | undefined;
|
|
210
|
+
rwaData?: {
|
|
211
|
+
instrumentType: string;
|
|
212
|
+
ticker: string;
|
|
213
|
+
market: {
|
|
214
|
+
nextOpen: string;
|
|
215
|
+
nextClose: string;
|
|
216
|
+
};
|
|
217
|
+
nextPause: {
|
|
218
|
+
start: string;
|
|
219
|
+
end: string;
|
|
220
|
+
};
|
|
221
|
+
} | undefined;
|
|
126
222
|
};
|
|
127
223
|
srcAmount: string;
|
|
128
224
|
destAmount: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.d.mts","sourceRoot":"","sources":["../../src/utils/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,sCAAsC;AAS7E,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,KAAK,EACL,MAAM,EACP,oCAAoC;AAErC,OAAO,EAEL,eAAe,EAChB,yCAAyC;AAC1C,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EAChB,yCAAyC;AAQ1C,OAAO,KAAK,EACV,+BAA+B,EAC/B,qBAAqB,EACtB,qBAAiB;AAElB,eAAO,MAAM,gBAAgB,cAAgD,CAAC;AAE9E,eAAO,MAAM,sBAAsB,kBAAmB,aAAa
|
|
1
|
+
{"version":3,"file":"transaction.d.mts","sourceRoot":"","sources":["../../src/utils/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,sCAAsC;AAS7E,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,KAAK,EACL,MAAM,EACP,oCAAoC;AAErC,OAAO,EAEL,eAAe,EAChB,yCAAyC;AAC1C,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EAChB,yCAAyC;AAQ1C,OAAO,KAAK,EACV,+BAA+B,EAC/B,qBAAqB,EACtB,qBAAiB;AAElB,eAAO,MAAM,gBAAgB,cAAgD,CAAC;AAE9E,eAAO,MAAM,sBAAsB,kBAAmB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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mCACa,MAAM;;;;MAMtC,sBAiBF,CAAC;AAEF,eAAO,MAAM,4BAA4B;;gBAoB3B,OAAO;WACZ,MAAM;mBACE,KAAK,aAAa,EAAE,UAAU,GAAG,OAAO,CAAC,GACtD,QAAQ,aAAa,CAAC;sBACN,OAAO,sBAAsB,SAAS,CAAC,cAAc;;;;;;;;;;;;;;;;;;;;iFA0FxE,CAAC;AAEF,eAAO,MAAM,gCAAgC;;yBAOtB,OAAO,sBAAsB,SAAS,CAAC,iBAAiB;aACpE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEhB,CAAC"}
|
|
@@ -14,6 +14,18 @@ export declare const StatusResponseSchema: import("@metamask/superstruct").Struc
|
|
|
14
14
|
decimals: number;
|
|
15
15
|
icon?: string | null | undefined;
|
|
16
16
|
iconUrl?: string | null | undefined;
|
|
17
|
+
rwaData?: {
|
|
18
|
+
instrumentType: string;
|
|
19
|
+
ticker: string;
|
|
20
|
+
market: {
|
|
21
|
+
nextOpen: string;
|
|
22
|
+
nextClose: string;
|
|
23
|
+
};
|
|
24
|
+
nextPause: {
|
|
25
|
+
start: string;
|
|
26
|
+
end: string;
|
|
27
|
+
};
|
|
28
|
+
} | undefined;
|
|
17
29
|
} | undefined;
|
|
18
30
|
};
|
|
19
31
|
destChain?: {
|
|
@@ -29,6 +41,18 @@ export declare const StatusResponseSchema: import("@metamask/superstruct").Struc
|
|
|
29
41
|
decimals: number;
|
|
30
42
|
icon?: string | null | undefined;
|
|
31
43
|
iconUrl?: string | null | undefined;
|
|
44
|
+
rwaData?: {
|
|
45
|
+
instrumentType: string;
|
|
46
|
+
ticker: string;
|
|
47
|
+
market: {
|
|
48
|
+
nextOpen: string;
|
|
49
|
+
nextClose: string;
|
|
50
|
+
};
|
|
51
|
+
nextPause: {
|
|
52
|
+
start: string;
|
|
53
|
+
end: string;
|
|
54
|
+
};
|
|
55
|
+
} | undefined;
|
|
32
56
|
} | undefined;
|
|
33
57
|
} | undefined;
|
|
34
58
|
bridge?: string | undefined;
|
|
@@ -56,6 +80,18 @@ export declare const StatusResponseSchema: import("@metamask/superstruct").Struc
|
|
|
56
80
|
decimals: number;
|
|
57
81
|
icon?: string | null | undefined;
|
|
58
82
|
iconUrl?: string | null | undefined;
|
|
83
|
+
rwaData?: {
|
|
84
|
+
instrumentType: string;
|
|
85
|
+
ticker: string;
|
|
86
|
+
market: {
|
|
87
|
+
nextOpen: string;
|
|
88
|
+
nextClose: string;
|
|
89
|
+
};
|
|
90
|
+
nextPause: {
|
|
91
|
+
start: string;
|
|
92
|
+
end: string;
|
|
93
|
+
};
|
|
94
|
+
} | undefined;
|
|
59
95
|
} | undefined;
|
|
60
96
|
}, {
|
|
61
97
|
chainId: import("@metamask/superstruct").Struct<number, null>;
|
|
@@ -77,6 +113,18 @@ export declare const StatusResponseSchema: import("@metamask/superstruct").Struc
|
|
|
77
113
|
decimals: number;
|
|
78
114
|
icon?: string | null | undefined;
|
|
79
115
|
iconUrl?: string | null | undefined;
|
|
116
|
+
rwaData?: {
|
|
117
|
+
instrumentType: string;
|
|
118
|
+
ticker: string;
|
|
119
|
+
market: {
|
|
120
|
+
nextOpen: string;
|
|
121
|
+
nextClose: string;
|
|
122
|
+
};
|
|
123
|
+
nextPause: {
|
|
124
|
+
start: string;
|
|
125
|
+
end: string;
|
|
126
|
+
};
|
|
127
|
+
} | undefined;
|
|
80
128
|
} | undefined, null>;
|
|
81
129
|
}>;
|
|
82
130
|
destChain: import("@metamask/superstruct").Struct<{
|
|
@@ -92,6 +140,18 @@ export declare const StatusResponseSchema: import("@metamask/superstruct").Struc
|
|
|
92
140
|
decimals: number;
|
|
93
141
|
icon?: string | null | undefined;
|
|
94
142
|
iconUrl?: string | null | undefined;
|
|
143
|
+
rwaData?: {
|
|
144
|
+
instrumentType: string;
|
|
145
|
+
ticker: string;
|
|
146
|
+
market: {
|
|
147
|
+
nextOpen: string;
|
|
148
|
+
nextClose: string;
|
|
149
|
+
};
|
|
150
|
+
nextPause: {
|
|
151
|
+
start: string;
|
|
152
|
+
end: string;
|
|
153
|
+
};
|
|
154
|
+
} | undefined;
|
|
95
155
|
} | undefined;
|
|
96
156
|
} | undefined, {
|
|
97
157
|
chainId: import("@metamask/superstruct").Struct<number, null>;
|
|
@@ -109,6 +169,18 @@ export declare const StatusResponseSchema: import("@metamask/superstruct").Struc
|
|
|
109
169
|
decimals: number;
|
|
110
170
|
icon?: string | null | undefined;
|
|
111
171
|
iconUrl?: string | null | undefined;
|
|
172
|
+
rwaData?: {
|
|
173
|
+
instrumentType: string;
|
|
174
|
+
ticker: string;
|
|
175
|
+
market: {
|
|
176
|
+
nextOpen: string;
|
|
177
|
+
nextClose: string;
|
|
178
|
+
};
|
|
179
|
+
nextPause: {
|
|
180
|
+
start: string;
|
|
181
|
+
end: string;
|
|
182
|
+
};
|
|
183
|
+
} | undefined;
|
|
112
184
|
} | undefined, null>;
|
|
113
185
|
}>;
|
|
114
186
|
bridge: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
@@ -131,6 +203,18 @@ export declare const validateBridgeStatusResponse: (data: unknown) => data is {
|
|
|
131
203
|
decimals: number;
|
|
132
204
|
icon?: string | null | undefined;
|
|
133
205
|
iconUrl?: string | null | undefined;
|
|
206
|
+
rwaData?: {
|
|
207
|
+
instrumentType: string;
|
|
208
|
+
ticker: string;
|
|
209
|
+
market: {
|
|
210
|
+
nextOpen: string;
|
|
211
|
+
nextClose: string;
|
|
212
|
+
};
|
|
213
|
+
nextPause: {
|
|
214
|
+
start: string;
|
|
215
|
+
end: string;
|
|
216
|
+
};
|
|
217
|
+
} | undefined;
|
|
134
218
|
} | undefined;
|
|
135
219
|
};
|
|
136
220
|
destChain?: {
|
|
@@ -146,6 +230,18 @@ export declare const validateBridgeStatusResponse: (data: unknown) => data is {
|
|
|
146
230
|
decimals: number;
|
|
147
231
|
icon?: string | null | undefined;
|
|
148
232
|
iconUrl?: string | null | undefined;
|
|
233
|
+
rwaData?: {
|
|
234
|
+
instrumentType: string;
|
|
235
|
+
ticker: string;
|
|
236
|
+
market: {
|
|
237
|
+
nextOpen: string;
|
|
238
|
+
nextClose: string;
|
|
239
|
+
};
|
|
240
|
+
nextPause: {
|
|
241
|
+
start: string;
|
|
242
|
+
end: string;
|
|
243
|
+
};
|
|
244
|
+
} | undefined;
|
|
149
245
|
} | undefined;
|
|
150
246
|
} | undefined;
|
|
151
247
|
bridge?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.cts","sourceRoot":"","sources":["../../src/utils/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAqB,oCAAoC;AA6C7E,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"validators.d.cts","sourceRoot":"","sources":["../../src/utils/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAqB,oCAAoC;AA6C7E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAxB/B;;;WAGG;;QAEH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAQH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAeH,CAAC;AAEH,eAAO,MAAM,4BAA4B,SACjC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAId,CAAC;AAEF,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,iBAAiB,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE;QACR,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;KAC9B,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;EAOpC,CAAC;AAEH,eAAO,MAAM,2BAA2B,SAChC,OAAO;;;;;;;CAGd,CAAC"}
|
|
@@ -14,6 +14,18 @@ export declare const StatusResponseSchema: import("@metamask/superstruct").Struc
|
|
|
14
14
|
decimals: number;
|
|
15
15
|
icon?: string | null | undefined;
|
|
16
16
|
iconUrl?: string | null | undefined;
|
|
17
|
+
rwaData?: {
|
|
18
|
+
instrumentType: string;
|
|
19
|
+
ticker: string;
|
|
20
|
+
market: {
|
|
21
|
+
nextOpen: string;
|
|
22
|
+
nextClose: string;
|
|
23
|
+
};
|
|
24
|
+
nextPause: {
|
|
25
|
+
start: string;
|
|
26
|
+
end: string;
|
|
27
|
+
};
|
|
28
|
+
} | undefined;
|
|
17
29
|
} | undefined;
|
|
18
30
|
};
|
|
19
31
|
destChain?: {
|
|
@@ -29,6 +41,18 @@ export declare const StatusResponseSchema: import("@metamask/superstruct").Struc
|
|
|
29
41
|
decimals: number;
|
|
30
42
|
icon?: string | null | undefined;
|
|
31
43
|
iconUrl?: string | null | undefined;
|
|
44
|
+
rwaData?: {
|
|
45
|
+
instrumentType: string;
|
|
46
|
+
ticker: string;
|
|
47
|
+
market: {
|
|
48
|
+
nextOpen: string;
|
|
49
|
+
nextClose: string;
|
|
50
|
+
};
|
|
51
|
+
nextPause: {
|
|
52
|
+
start: string;
|
|
53
|
+
end: string;
|
|
54
|
+
};
|
|
55
|
+
} | undefined;
|
|
32
56
|
} | undefined;
|
|
33
57
|
} | undefined;
|
|
34
58
|
bridge?: string | undefined;
|
|
@@ -56,6 +80,18 @@ export declare const StatusResponseSchema: import("@metamask/superstruct").Struc
|
|
|
56
80
|
decimals: number;
|
|
57
81
|
icon?: string | null | undefined;
|
|
58
82
|
iconUrl?: string | null | undefined;
|
|
83
|
+
rwaData?: {
|
|
84
|
+
instrumentType: string;
|
|
85
|
+
ticker: string;
|
|
86
|
+
market: {
|
|
87
|
+
nextOpen: string;
|
|
88
|
+
nextClose: string;
|
|
89
|
+
};
|
|
90
|
+
nextPause: {
|
|
91
|
+
start: string;
|
|
92
|
+
end: string;
|
|
93
|
+
};
|
|
94
|
+
} | undefined;
|
|
59
95
|
} | undefined;
|
|
60
96
|
}, {
|
|
61
97
|
chainId: import("@metamask/superstruct").Struct<number, null>;
|
|
@@ -77,6 +113,18 @@ export declare const StatusResponseSchema: import("@metamask/superstruct").Struc
|
|
|
77
113
|
decimals: number;
|
|
78
114
|
icon?: string | null | undefined;
|
|
79
115
|
iconUrl?: string | null | undefined;
|
|
116
|
+
rwaData?: {
|
|
117
|
+
instrumentType: string;
|
|
118
|
+
ticker: string;
|
|
119
|
+
market: {
|
|
120
|
+
nextOpen: string;
|
|
121
|
+
nextClose: string;
|
|
122
|
+
};
|
|
123
|
+
nextPause: {
|
|
124
|
+
start: string;
|
|
125
|
+
end: string;
|
|
126
|
+
};
|
|
127
|
+
} | undefined;
|
|
80
128
|
} | undefined, null>;
|
|
81
129
|
}>;
|
|
82
130
|
destChain: import("@metamask/superstruct").Struct<{
|
|
@@ -92,6 +140,18 @@ export declare const StatusResponseSchema: import("@metamask/superstruct").Struc
|
|
|
92
140
|
decimals: number;
|
|
93
141
|
icon?: string | null | undefined;
|
|
94
142
|
iconUrl?: string | null | undefined;
|
|
143
|
+
rwaData?: {
|
|
144
|
+
instrumentType: string;
|
|
145
|
+
ticker: string;
|
|
146
|
+
market: {
|
|
147
|
+
nextOpen: string;
|
|
148
|
+
nextClose: string;
|
|
149
|
+
};
|
|
150
|
+
nextPause: {
|
|
151
|
+
start: string;
|
|
152
|
+
end: string;
|
|
153
|
+
};
|
|
154
|
+
} | undefined;
|
|
95
155
|
} | undefined;
|
|
96
156
|
} | undefined, {
|
|
97
157
|
chainId: import("@metamask/superstruct").Struct<number, null>;
|
|
@@ -109,6 +169,18 @@ export declare const StatusResponseSchema: import("@metamask/superstruct").Struc
|
|
|
109
169
|
decimals: number;
|
|
110
170
|
icon?: string | null | undefined;
|
|
111
171
|
iconUrl?: string | null | undefined;
|
|
172
|
+
rwaData?: {
|
|
173
|
+
instrumentType: string;
|
|
174
|
+
ticker: string;
|
|
175
|
+
market: {
|
|
176
|
+
nextOpen: string;
|
|
177
|
+
nextClose: string;
|
|
178
|
+
};
|
|
179
|
+
nextPause: {
|
|
180
|
+
start: string;
|
|
181
|
+
end: string;
|
|
182
|
+
};
|
|
183
|
+
} | undefined;
|
|
112
184
|
} | undefined, null>;
|
|
113
185
|
}>;
|
|
114
186
|
bridge: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
@@ -131,6 +203,18 @@ export declare const validateBridgeStatusResponse: (data: unknown) => data is {
|
|
|
131
203
|
decimals: number;
|
|
132
204
|
icon?: string | null | undefined;
|
|
133
205
|
iconUrl?: string | null | undefined;
|
|
206
|
+
rwaData?: {
|
|
207
|
+
instrumentType: string;
|
|
208
|
+
ticker: string;
|
|
209
|
+
market: {
|
|
210
|
+
nextOpen: string;
|
|
211
|
+
nextClose: string;
|
|
212
|
+
};
|
|
213
|
+
nextPause: {
|
|
214
|
+
start: string;
|
|
215
|
+
end: string;
|
|
216
|
+
};
|
|
217
|
+
} | undefined;
|
|
134
218
|
} | undefined;
|
|
135
219
|
};
|
|
136
220
|
destChain?: {
|
|
@@ -146,6 +230,18 @@ export declare const validateBridgeStatusResponse: (data: unknown) => data is {
|
|
|
146
230
|
decimals: number;
|
|
147
231
|
icon?: string | null | undefined;
|
|
148
232
|
iconUrl?: string | null | undefined;
|
|
233
|
+
rwaData?: {
|
|
234
|
+
instrumentType: string;
|
|
235
|
+
ticker: string;
|
|
236
|
+
market: {
|
|
237
|
+
nextOpen: string;
|
|
238
|
+
nextClose: string;
|
|
239
|
+
};
|
|
240
|
+
nextPause: {
|
|
241
|
+
start: string;
|
|
242
|
+
end: string;
|
|
243
|
+
};
|
|
244
|
+
} | undefined;
|
|
149
245
|
} | undefined;
|
|
150
246
|
} | undefined;
|
|
151
247
|
bridge?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.mts","sourceRoot":"","sources":["../../src/utils/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAqB,oCAAoC;AA6C7E,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"validators.d.mts","sourceRoot":"","sources":["../../src/utils/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAqB,oCAAoC;AA6C7E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAxB/B;;;WAGG;;QAEH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAQH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAeH,CAAC;AAEH,eAAO,MAAM,4BAA4B,SACjC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAId,CAAC;AAEF,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,iBAAiB,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE;QACR,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;KAC9B,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;EAOpC,CAAC;AAEH,eAAO,MAAM,2BAA2B,SAChC,OAAO;;;;;;;CAGd,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask-previews/bridge-status-controller",
|
|
3
|
-
"version": "64.
|
|
3
|
+
"version": "64.4.1-preview-8a4f4ea3",
|
|
4
4
|
"description": "Manages bridge-related status fetching functionality for MetaMask",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"MetaMask",
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@metamask/accounts-controller": "^35.0.0",
|
|
52
52
|
"@metamask/base-controller": "^9.0.0",
|
|
53
|
-
"@metamask/bridge-controller": "^64.
|
|
53
|
+
"@metamask/bridge-controller": "^64.4.0",
|
|
54
54
|
"@metamask/controller-utils": "^11.18.0",
|
|
55
55
|
"@metamask/gas-fee-controller": "^26.0.0",
|
|
56
56
|
"@metamask/network-controller": "^27.2.0",
|
|
57
57
|
"@metamask/polling-controller": "^16.0.0",
|
|
58
58
|
"@metamask/snaps-controllers": "^17.2.0",
|
|
59
59
|
"@metamask/superstruct": "^3.1.0",
|
|
60
|
-
"@metamask/transaction-controller": "^62.
|
|
60
|
+
"@metamask/transaction-controller": "^62.8.0",
|
|
61
61
|
"@metamask/utils": "^11.9.0",
|
|
62
62
|
"bignumber.js": "^9.1.2",
|
|
63
63
|
"uuid": "^8.3.2"
|