Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINT-1788 Remove ui actions from core-dependencies #791

Merged
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"devDependencies": {
"@chronobank/chronomint-presentation": "github:chronobank/ChronoMintPresentation",
"@chronobank/core": "*",
"@chronobank/core-dependencies": "*",
"@chronobank/login": "*",
"@chronobank/login-ui": "*",
"archiver": "^2.0.0",
Expand Down
7 changes: 0 additions & 7 deletions packages/core-dependencies/SessionStorage.js

This file was deleted.

6 changes: 0 additions & 6 deletions packages/core-dependencies/configureStore.js

This file was deleted.

4 changes: 0 additions & 4 deletions packages/core-dependencies/package.json

This file was deleted.

6 changes: 0 additions & 6 deletions packages/core-dependencies/redux/modals/actions.js

This file was deleted.

8 changes: 0 additions & 8 deletions packages/core-dependencies/redux/ui/actions.js

This file was deleted.

44 changes: 0 additions & 44 deletions packages/core-dependencies/utils/CustomSerializer.js

This file was deleted.

59 changes: 0 additions & 59 deletions packages/core-dependencies/utils/SessionStorage.js

This file was deleted.

3 changes: 0 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,5 @@
"uuid": "^3.3.0",
"web3": "npm:web3@1.0.0-beta.33",
"web3-eth-abi": "^1.0.0-beta.33"
},
"peerDependencies": {
"@chronobank/core-dependencies": "*"
}
}
2 changes: 2 additions & 0 deletions packages/core/redux/ducks.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import ethMultisigWallet from './multisigWallet/reducer'
import events from './events/reducer'
import mainWallet from './mainWallet/reducer'
import market from './market/reducer'
import modals from './modals/reducer'
import nem from './nem/reducer'
import notifier from './notifier/reducer'
import persistAccount from './persistAccount/reducer'
Expand All @@ -37,6 +38,7 @@ const coreReducers = {
events,
mainWallet,
market,
modals,
nem,
notifier,
persistAccount,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/redux/ethereum/thunks.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import BigNumber from 'bignumber.js'
import { isNil, omitBy } from 'lodash'
import { modalsOpen } from '@chronobank/core-dependencies/redux/modals/actions'
import { modalsOpen } from '@chronobank/core/redux/modals/actions'
import { SignerMemoryModel, TxEntryModel, HolderModel } from '../../models'
import { ethereumPendingSelector, pendingEntrySelector, web3Selector } from './selectors'
import { DUCK_ETHEREUM } from './constants'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,38 @@
* Licensed under the AGPL Version 3 license.
*/

/*
TODO: Futher refactoring. redux/modals MUST be moved
out of packages/core after finishing TX send refactoring
*/

import {
MODALS_OPEN,
MODALS_REPLACE,
MODALS_CLOSE,
MODALS_CLEAR,
} from './constants'

export const modalsOpen = ({ componentName, props }) => (dispatch) =>
dispatch({
export const modalsOpen = ({ componentName, props }) =>
({
type: MODALS_OPEN,
componentName,
props,
})

export const modalsReplace = ({ componentName, props }) => (dispatch) =>
dispatch({
export const modalsReplace = ({ componentName, props }) =>
({
type: MODALS_REPLACE,
componentName,
props,
})

export const modalsClose = () => (dispatch) =>
dispatch({
export const modalsClose = () =>
({
type: MODALS_CLOSE,
})

export const modalsClear = () => (dispatch) =>
dispatch({
export const modalsClear = () =>
({
type: MODALS_CLEAR,
})
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { store } from 'specsInit'
import * as actions from 'redux/modals/actions'
import * as actions from './actions'

describe('modals actions', () => {
['modalsOpen', 'modalsShow', 'modalsPush'].forEach((name) => {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* Licensed under the AGPL Version 3 license.
*/

import React, { PureComponent } from 'react'
import { PureComponent } from 'react'

import * as actions from 'redux/modals/actions'
import reducer from 'redux/modals/reducer'
import * as actions from './actions'
import reducer from './reducer'

const initialState = {
stack: [],
Expand Down
2 changes: 1 addition & 1 deletion packages/core/redux/nem/thunks.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the AGPL Version 3 license.
*/

import { modalsOpen } from '@chronobank/core-dependencies/redux/modals/actions'
import { modalsOpen } from '@chronobank/core/redux/modals/actions'
import { nemProvider } from '@chronobank/login/network/NemProvider'
import { ErrorNoticeModel, SignerMemoryModel, TransferNoticeModel } from '../../models'
import { nemPendingSelector, pendingEntrySelector } from './selectors'
Expand Down
Loading