Skip to content

Commit

Permalink
fix(suite): fetch last week fiat rate when add new token
Browse files Browse the repository at this point in the history
  • Loading branch information
enjojoy committed Jan 8, 2025
1 parent 87d5302 commit 31356eb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/suite/src/actions/wallet/tokenActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ export const addToken =
}),
);

dispatch(
updateFiatRatesThunk({
tickers: [
{
symbol: account.symbol,
tokenAddress: tokenInfo[0].contract as TokenAddress,
},
],
localCurrency,
rateType: 'lastWeek',
fetchAttemptTimestamp: Date.now() as Timestamp,
forceFetchToken: true,
}),
);

dispatch(
notificationsActions.addToast({
type: 'add-token-success',
Expand Down

0 comments on commit 31356eb

Please sign in to comment.