Skip to content

Commit

Permalink
Merge pull request #960 from etherisc/dependabot/npm_and_yarn/reduxjs…
Browse files Browse the repository at this point in the history
…/toolkit-2.0.1

Bump @reduxjs/toolkit from 1.9.7 to 2.0.1
  • Loading branch information
doerfli authored Dec 27, 2023
2 parents f3583c5 + bdd9b92 commit c58d3dd
Show file tree
Hide file tree
Showing 12 changed files with 104 additions and 110 deletions.
142 changes: 60 additions & 82 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@mui/material": "^5.15.2",
"@mui/x-data-grid": "^6.18.6",
"@mui/x-date-pickers": "^6.18.6",
"@reduxjs/toolkit": "^1.9.7",
"@reduxjs/toolkit": "^2.0.1",
"@web3modal/ethereum": "^2.7.1",
"@web3modal/react": "^2.7.1",
"abi-coder": "^4.1.1",
Expand All @@ -52,7 +52,7 @@
"react-dom": "^18.2.0",
"react-hook-form": "^7.49.2",
"react-i18next": "^12.3.1",
"react-redux": "^8.1.3",
"react-redux": "^9.0.4",
"redis": "^4.6.12",
"redis-om": "^0.4.3",
"request-ip": "^3.3.0",
Expand Down
4 changes: 2 additions & 2 deletions src/redux/slices/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const emptyUsd = {
decimals: 6,
};

const initialState: AccountState = {
export const INITIAL_ACCOUNT_STATE: AccountState = {
address: undefined,
balance: emptyEth,
balanceUsd1: emptyUsd,
Expand All @@ -30,7 +30,7 @@ const initialState: AccountState = {

export const accountSlice = createSlice({
name: 'account',
initialState,
initialState: INITIAL_ACCOUNT_STATE,
reducers: {
setAccount(state, action: PayloadAction<string>) {
state.address = action.payload;
Expand Down
4 changes: 2 additions & 2 deletions src/redux/slices/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface ApplicationState {
premiumCalculationInProgress: boolean;
}

const initialState: ApplicationState = {
export const INITIAL_APPLICATION_STATE: ApplicationState = {
productComponentState: ComponentState.Active,
bundles: [],
isLoadingBundles: false,
Expand All @@ -31,7 +31,7 @@ const initialState: ApplicationState = {

export const applicationSlice = createSlice({
name: 'application',
initialState,
initialState: INITIAL_APPLICATION_STATE,
reducers: {
addBundle: (state, action: PayloadAction<BundleData>) => {
const hasBundle = state.bundles.find((bundle) => bundle.id === action.payload.id) !== undefined;
Expand Down
4 changes: 2 additions & 2 deletions src/redux/slices/bundles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface BundlesState {
isShowBundleExtend: boolean;
}

const initialState: BundlesState = {
export const INITIAL_BUNDLES_STATE: BundlesState = {
bundles: [],
maxActiveBundles: 0,
showBundle: undefined,
Expand All @@ -34,7 +34,7 @@ const initialState: BundlesState = {

export const bundlesSlice = createSlice({
name: 'bundles',
initialState,
initialState: INITIAL_BUNDLES_STATE,
reducers: {
addBundle: (state, action: PayloadAction<BundleData>) => {
const hasBundle = state.bundles.find((bundle) => bundle.id === action.payload.id) !== undefined;
Expand Down
6 changes: 3 additions & 3 deletions src/redux/slices/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface ChainState {
blockTime: number,
}

const initialState: ChainState = {
export const INITIAL_CHAIN_STATE: ChainState = {
chainId: "0x0",
isConnected: false,
isExpectedChain: true,
Expand All @@ -32,15 +32,15 @@ const initialState: ChainState = {

export const chainSlice = createSlice({
name: 'chain',
initialState,
initialState: INITIAL_CHAIN_STATE,
reducers: {
connectChain(state, action: PayloadAction<ChainState>) {
state.provider?.removeAllListeners();
Object.assign(state, action.payload);
},
disconnectChain(state) {
state.provider?.removeAllListeners();
Object.assign(state, initialState);
Object.assign(state, INITIAL_CHAIN_STATE);
},
updateSigner(state, action: PayloadAction<Signer>) {
state.signer = action.payload;
Expand Down
4 changes: 2 additions & 2 deletions src/redux/slices/policies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface PoliciesState {
isDepegged: boolean;
}

const initialState: PoliciesState = {
export const INITIAL_POLICIES_STATE: PoliciesState = {
policies: [],
claimedPolicy: null,
isLoading: false,
Expand All @@ -18,7 +18,7 @@ const initialState: PoliciesState = {

export const policiesSlice = createSlice({
name: 'policies',
initialState,
initialState: INITIAL_POLICIES_STATE,
reducers: {
addPolicy: (state, action: PayloadAction<PolicyData>) => {
if (action.payload.id !== '') {
Expand Down
4 changes: 2 additions & 2 deletions src/redux/slices/price.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const initialPrice = {
} as PriceInfo;


const initialState: PriceState = {
export const INITIAL_PRICE_STATE: PriceState = {
symbol: "USDC",
name: "USD Coin",
decimals: 8,
Expand All @@ -47,7 +47,7 @@ const initialState: PriceState = {

export const priceSlice = createSlice({
name: 'price',
initialState,
initialState: INITIAL_PRICE_STATE,
reducers: {
setCoin: (state, action: PayloadAction<{ symbol: string, name: string, decimals: number}>) => {
state.symbol = action.payload.symbol;
Expand Down
Loading

0 comments on commit c58d3dd

Please sign in to comment.