mirror of
https://github.com/zoo-labs/zoo.git
synced 2026-11-10 22:32:34 +00:00
18 lines
400 B
TypeScript
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
|
|
})
|
|
)
|