diff --git a/packages/stellar-wallet-snap/CHANGELOG.md b/packages/stellar-wallet-snap/CHANGELOG.md index de2a0d829..e6268ac1d 100644 --- a/packages/stellar-wallet-snap/CHANGELOG.md +++ b/packages/stellar-wallet-snap/CHANGELOG.md @@ -11,4 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - This package was migrated from [snap-stellar-wallet](https://github.com/MetaMask/snap-stellar-wallet). See the source repository for the original [changelog](https://github.com/MetaMask/snap-stellar-wallet/blob/main/packages/snap/CHANGELOG.md) ([#161](https://github.com/MetaMask/internal-snaps/pull/161)) +### Fixed + +- Fixed a TypeScript error in the confirmation price refresher reducer ([#165](https://github.com/MetaMask/internal-snaps/pull/165)) + [Unreleased]: https://github.com/MetaMask/internal-snaps/ diff --git a/packages/stellar-wallet-snap/src/handlers/cronjob/refreshConfirmationContext/priceRefresher.ts b/packages/stellar-wallet-snap/src/handlers/cronjob/refreshConfirmationContext/priceRefresher.ts index ccf337d91..b05bf6b56 100644 --- a/packages/stellar-wallet-snap/src/handlers/cronjob/refreshConfirmationContext/priceRefresher.ts +++ b/packages/stellar-wallet-snap/src/handlers/cronjob/refreshConfirmationContext/priceRefresher.ts @@ -82,10 +82,13 @@ export class ConfirmationPriceRefresher implements IConfirmationContextRefresher const updatedTokenPrices = uniqueAssetCaipIds.reduce< ContextWithPrices['tokenPrices'] - >((acc, assetId) => { - acc[assetId] = prices[assetId]?.price.toString() ?? null; - return acc; - }, {}); + >( + (acc, assetId) => { + acc[assetId] = prices[assetId]?.price.toString() ?? null; + return acc; + }, + {} as ContextWithPrices['tokenPrices'], + ); return { result: {