Skip to content

Commit

Permalink
MINT-1788 Removed core-dependencies (#791)
Browse files Browse the repository at this point in the history
Worklog:
* MINT-1788 Remove redundant dispatch
* MINT-1788 Move removeWatchersUserMonitor to src
* MINT-1788 Remove core/redux/ui
* MINT-1788 Move redux/modals to core
redux/modals is a pure state part. It is needed by some core actions
and can't be removed from core totally.
Modals reducer can be replaced in different environment.
* MINT-1788 Decouple userMonitorService from core
Move UserMonitorService and corresponding actions
to @chronobank/login-ui package. Start service after session is created
* MINT-1788 Remove obsolete session tests
* MINT-1788 Remove redundant saveAccountMiddleWare
* MINT-1788 Move clipboard util to src
* MINT-1788 Remove core-dependencies package
* MINT-1788 Add important TODO comment
  • Loading branch information
olegdeezus authored and ozalexo committed Sep 10, 2018
1 parent 2bb2d4d commit e0d1b82
Show file tree
Hide file tree
Showing 75 changed files with 114 additions and 420 deletions.
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

0 comments on commit e0d1b82

Please sign in to comment.