Skip to content

Commit 166bc0c

Browse files
committed
Retry failed token price updates
The `token-prices-service` will now retry token price updates if they fail. The retry strategy is designed to let the API recover if it is experiencing high traffic volumes. The service now requires state in order to hold onto the retry policy. It has been converted to a class for that reason. This required no changes to the abstract price service type or to the `TokenRatesController`. Closes #2084
1 parent aea9bac commit 166bc0c

File tree

7 files changed

+495
-25
lines changed

7 files changed

+495
-25
lines changed

packages/assets-controllers/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"@metamask/utils": "^8.2.0",
4949
"@types/uuid": "^8.3.0",
5050
"async-mutex": "^0.2.6",
51+
"cockatiel": "3.1.1",
5152
"ethereumjs-util": "^7.0.10",
5253
"lodash": "^4.17.21",
5354
"multiformats": "^9.5.2",

packages/assets-controllers/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ export {
1313
formatIconUrlWithProxy,
1414
getFormattedIpfsUrl,
1515
} from './assetsUtil';
16-
export { codefiTokenPricesServiceV2 } from './token-prices-service';
16+
export { CodefiTokenPricesServiceV2 } from './token-prices-service';

0 commit comments

Comments
 (0)