@metamask-previews/gas-fee-controller
Advanced tools
Comparing version 8.0.0-preview.ce06456 to 9.0.0-preview.0c0cc64
@@ -9,2 +9,14 @@ # Changelog | ||
## [9.0.0] | ||
### Added | ||
- Add way to start and stop different polling sessions for the same network client ID by providing extra scoping data ([#1776](https://github.com/MetaMask/core/pull/1776)) | ||
- Add optional second argument to `stopPollingByPollingToken` (formerly `stopPollingByNetworkClientId`) | ||
- Add optional second argument to `onPollingCompleteByNetworkClientId` | ||
### Changed | ||
- **BREAKING:** Make `executePoll` private ([#1810](https://github.com/MetaMask/core/pull/1810)) | ||
- **BREAKING:** Rename `stopPollingByNetworkClientId` to `stopPollingByPollingToken` ([#1810](https://github.com/MetaMask/core/pull/1810)) | ||
- **BREAKING:** Bump dependency and peer dependency on `@metamask/network-controller` to ^15.0.0 | ||
- **BREAKING:** Bump dependency on `@metamask/polling-controller` to ^0.2.0 | ||
## [8.0.0] | ||
@@ -102,3 +114,4 @@ ### Added | ||
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/gas-fee-controller@8.0.0...HEAD | ||
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/gas-fee-controller@9.0.0...HEAD | ||
[9.0.0]: https://github.com/MetaMask/core/compare/@metamask/gas-fee-controller@8.0.0...@metamask/gas-fee-controller@9.0.0 | ||
[8.0.0]: https://github.com/MetaMask/core/compare/@metamask/gas-fee-controller@7.0.1...@metamask/gas-fee-controller@8.0.0 | ||
@@ -105,0 +118,0 @@ [7.0.1]: https://github.com/MetaMask/core/compare/@metamask/gas-fee-controller@7.0.0...@metamask/gas-fee-controller@7.0.1 |
@@ -230,3 +230,10 @@ import type { RestrictedControllerMessenger } from '@metamask/base-controller'; | ||
private _poll; | ||
executePoll(networkClientId: string): Promise<void>; | ||
/** | ||
* Fetching token list from the Token Service API. | ||
* | ||
* @private | ||
* @param networkClientId - The ID of the network client triggering the fetch. | ||
* @returns A promise that resolves when this operation completes. | ||
*/ | ||
_executePoll(networkClientId: string): Promise<void>; | ||
private resetState; | ||
@@ -233,0 +240,0 @@ private getEIP1559Compatibility; |
@@ -113,2 +113,3 @@ "use strict"; | ||
this.clientId = clientId; | ||
// @ts-expect-error TODO: Provider type alignment | ||
this.ethQuery = new eth_query_1.default(__classPrivateFieldGet(this, _GasFeeController_getProvider, "f").call(this)); | ||
@@ -236,3 +237,10 @@ if (onNetworkStateChange && getChainId) { | ||
} | ||
executePoll(networkClientId) { | ||
/** | ||
* Fetching token list from the Token Service API. | ||
* | ||
* @private | ||
* @param networkClientId - The ID of the network client triggering the fetch. | ||
* @returns A promise that resolves when this operation completes. | ||
*/ | ||
_executePoll(networkClientId) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -277,2 +285,3 @@ yield __classPrivateFieldGet(this, _GasFeeController_instances, "m", _GasFeeController_fetchGasFeeEstimateForNetworkClientId).call(this, networkClientId); | ||
} | ||
// @ts-expect-error TODO: Provider type alignment | ||
const ethQuery = new eth_query_1.default(networkClient.provider); | ||
@@ -305,2 +314,3 @@ const gasFeeCalculations = yield (0, determineGasFeeCalculations_1.default)({ | ||
if (newChainId !== this.currentChainId) { | ||
// @ts-expect-error TODO: Provider type alignment | ||
this.ethQuery = new eth_query_1.default(__classPrivateFieldGet(this, _GasFeeController_getProvider, "f").call(this)); | ||
@@ -307,0 +317,0 @@ yield this.resetPolling(); |
{ | ||
"name": "@metamask-previews/gas-fee-controller", | ||
"version": "8.0.0-preview.ce06456", | ||
"version": "9.0.0-preview.0c0cc64", | ||
"description": "Periodically calculates gas fee estimates based on various gas limits as well as other data displayed on transaction confirm screens", | ||
@@ -35,4 +35,4 @@ "keywords": [ | ||
"@metamask/eth-query": "^3.0.1", | ||
"@metamask/network-controller": "^14.0.0", | ||
"@metamask/polling-controller": "^0.1.0", | ||
"@metamask/network-controller": "^15.0.0", | ||
"@metamask/polling-controller": "^0.2.0", | ||
"@metamask/utils": "^8.1.0", | ||
@@ -60,3 +60,3 @@ "@types/uuid": "^8.3.0", | ||
"peerDependencies": { | ||
"@metamask/network-controller": "^14.0.0" | ||
"@metamask/network-controller": "^15.0.0" | ||
}, | ||
@@ -63,0 +63,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
172411
1460
+ Added@metamask/abi-utils@2.0.4(transitive)
+ Added@metamask/eth-block-tracker@9.0.3(transitive)
+ Added@metamask/eth-json-rpc-infura@9.1.0(transitive)
+ Added@metamask/eth-json-rpc-middleware@12.1.2(transitive)
+ Added@metamask/eth-json-rpc-provider@2.3.23.0.2(transitive)
+ Added@metamask/eth-sig-util@7.0.3(transitive)
+ Added@metamask/json-rpc-engine@8.0.2(transitive)
+ Added@metamask/network-controller@15.2.0(transitive)
+ Added@metamask/polling-controller@0.2.0(transitive)
+ Addedeth-block-tracker@8.1.0(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedklona@2.0.6(transitive)
+ Addedpify@5.0.0(transitive)
- Removed@metamask/abi-utils@1.2.0(transitive)
- Removed@metamask/eth-json-rpc-infura@8.1.1(transitive)
- Removed@metamask/eth-json-rpc-middleware@11.0.2(transitive)
- Removed@metamask/eth-json-rpc-provider@1.0.1(transitive)
- Removed@metamask/eth-sig-util@6.0.2(transitive)
- Removed@metamask/network-controller@14.0.0(transitive)
- Removed@metamask/polling-controller@0.1.0(transitive)
- Removed@metamask/safe-event-emitter@2.0.0(transitive)
- Removed@metamask/utils@3.6.04.0.05.0.2(transitive)
- Removed@scure/base@1.2.4(transitive)
- Removedclone@2.1.2(transitive)
- Removedeth-block-tracker@7.1.0(transitive)
- Removedeth-rpc-errors@4.0.3(transitive)
- Removedethjs-util@0.1.6(transitive)
- Removedjson-rpc-engine@6.1.0(transitive)
- Removedpify@3.0.0(transitive)
- Removedsuperstruct@1.0.4(transitive)
- Removedtweetnacl-util@0.15.1(transitive)