import { createAction } from '@reduxjs/toolkit' ; import { TokenData , TokenChartEntry } from './reducer' ; import { PriceChartEntry , Transaction } from 'types' ; import { SupportedNetwork } from 'constants/networks' ; export const updateTokenData = createAction < { tokens : TokenData [ ] ; networkId : SupportedNetwork ; } > ( 'tokens/updateTokenData' ) ; export const addTokenKeys = createAction < { tokenAddresses : string [ ] ; networkId : SupportedNetwork ; } > ( 'tokens/addTokenKeys' ) ; export const addPoolAddresses = createAction < { tokenAddress : string ; poolAddresses : string [ ] ; networkId : SupportedNetwork ; } > ( 'tokens/addPoolAddresses' ) ; export const updateChartData = createAction < { tokenAddress : string ; chartData : TokenChartEntry [ ] ; networkId : SupportedNetwork ; } > ( 'tokens/updateChartData' ) ; export const updateTransactions = createAction < { tokenAddress : string ; transactions : Transaction [ ] ; networkId : SupportedNetwork ; } > ( 'tokens/updateTransactions' ) ; export const updatePriceData = createAction < { tokenAddress : string ; secondsInterval : number ; priceData : PriceChartEntry [ ] | undefined ; oldestFetchedTimestamp : number ; networkId : SupportedNetwork ; } > ( 'tokens/updatePriceData' ) ;