mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-30 19:00:53 +00:00
change prefix of coin specific reducers
This commit is contained in:
parent
e34b9141d8
commit
eafd541477
@ -75,16 +75,15 @@ export const initialState: State = {
|
||||
};
|
||||
|
||||
export default (state: State = initialState, action: Action): State => {
|
||||
if (action.type === ACCOUNT.DISPOSE) return initialState;
|
||||
if (!action.networkType || action.networkType !== 'ethereum') return state;
|
||||
|
||||
switch (action.type) {
|
||||
case SEND.INIT:
|
||||
case SEND.CHANGE:
|
||||
case SEND.VALIDATION:
|
||||
return action.state;
|
||||
|
||||
case ACCOUNT.DISPOSE:
|
||||
return initialState;
|
||||
|
||||
|
||||
case SEND.TOGGLE_ADVANCED:
|
||||
return {
|
||||
...state,
|
@ -38,13 +38,11 @@ export type State = {
|
||||
export const initialState: State = {
|
||||
networkName: '',
|
||||
networkSymbol: '',
|
||||
currency: '',
|
||||
|
||||
advanced: false,
|
||||
untouched: true,
|
||||
touched: {},
|
||||
address: '',
|
||||
//address: '0x574BbB36871bA6b78E27f4B4dCFb76eA0091880B',
|
||||
amount: '',
|
||||
setMax: false,
|
||||
feeLevels: [],
|
||||
@ -55,23 +53,23 @@ export const initialState: State = {
|
||||
},
|
||||
sequence: '0',
|
||||
total: '0',
|
||||
sending: false,
|
||||
|
||||
errors: {},
|
||||
warnings: {},
|
||||
infos: {},
|
||||
|
||||
sending: false,
|
||||
};
|
||||
|
||||
export default (state: State = initialState, action: Action): State => {
|
||||
if (action.type === ACCOUNT.DISPOSE) return initialState;
|
||||
if (!action.networkType || action.networkType !== 'ripple') return state;
|
||||
|
||||
switch (action.type) {
|
||||
case SEND.INIT:
|
||||
case SEND.CHANGE:
|
||||
case SEND.VALIDATION:
|
||||
// return action.state;
|
||||
return state;
|
||||
|
||||
case ACCOUNT.DISPOSE:
|
||||
return initialState;
|
||||
|
||||
return action.state;
|
||||
|
||||
case SEND.TOGGLE_ADVANCED:
|
||||
return {
|
@ -10,8 +10,8 @@ import modal from 'reducers/ModalReducer';
|
||||
import web3 from 'reducers/Web3Reducer';
|
||||
import accounts from 'reducers/AccountsReducer';
|
||||
import selectedAccount from 'reducers/SelectedAccountReducer';
|
||||
import sendForm from 'reducers/SendFormReducer';
|
||||
import rippleSendForm from 'reducers/RippleSendFormReducer';
|
||||
import sendFormEthereum from 'reducers/SendFormEthereumReducer';
|
||||
import sendFormRipple from 'reducers/SendFormRippleReducer';
|
||||
import receive from 'reducers/ReceiveReducer';
|
||||
import summary from 'reducers/SummaryReducer';
|
||||
import tokens from 'reducers/TokensReducer';
|
||||
@ -33,8 +33,8 @@ const reducers = {
|
||||
web3,
|
||||
accounts,
|
||||
selectedAccount,
|
||||
sendForm,
|
||||
rippleSendForm,
|
||||
sendFormEthereum,
|
||||
sendFormRipple,
|
||||
receive,
|
||||
summary,
|
||||
tokens,
|
||||
|
Loading…
Reference in New Issue
Block a user