Files
2026-04-01 15:52:53 -07:00

18 lines
400 B
TypeScript

import { createReducer } from '@reduxjs/toolkit'
import { updateGasPrice } from './actions'
export interface NetworkState {
gasPrice: number
}
const initialState: NetworkState = {
gasPrice: 0,
}
export default createReducer(initialState, (builder) =>
builder.addCase(updateGasPrice.fulfilled, (state, action) => {
const { gasPrice } = action.payload
state.gasPrice = gasPrice
})
)