Edit Multisig Wallet settings (#3740)
* WIP Sending tokens in multi-sig wallet * Working Token transfer for multi-sig wallet #3282 * Add operation hash to transfer modal * Add existing wallet from address #3282 * Wallet delete redirect to Wallets/Accounts #3282 * Rightly check balance in Transfer // Get all accounts balances #3282 * Fix linting * Better Header UI for Wallet * Use the `~` webpack alias * Use Webpack `~` alias * Add `ETH` format to number typed input * Fix wallet creation hint && eth input type * Update dailylimit #3282 * Fix too long copied message * WIP Wallet settings modification #3282 * WIP edit contract parameters #3282 * Edit Wallet parameters #3282 * Don't show wallets if none * Fix Transfer for Wallet #3282 * Optimized version of contract code * Fix wrong max in Wallet creation // Round gas in API
This commit is contained in:
committed by
Jaco Greeff
parent
69e010bbf9
commit
715761a714
@@ -22,9 +22,10 @@ import moment from 'moment';
|
||||
import ContentCreate from 'material-ui/svg-icons/content/create';
|
||||
import ActionDelete from 'material-ui/svg-icons/action/delete';
|
||||
import ContentSend from 'material-ui/svg-icons/content/send';
|
||||
import SettingsIcon from 'material-ui/svg-icons/action/settings';
|
||||
|
||||
import { nullableProptype } from '~/util/proptypes';
|
||||
import { EditMeta, Transfer } from '~/modals';
|
||||
import { EditMeta, Transfer, WalletSettings } from '~/modals';
|
||||
import { Actionbar, Button, Page, Loading } from '~/ui';
|
||||
|
||||
import Delete from '../Address/Delete';
|
||||
@@ -74,6 +75,7 @@ class Wallet extends Component {
|
||||
|
||||
state = {
|
||||
showEditDialog: false,
|
||||
showSettingsDialog: false,
|
||||
showTransferDialog: false,
|
||||
showDeleteDialog: false
|
||||
};
|
||||
@@ -115,6 +117,7 @@ class Wallet extends Component {
|
||||
return (
|
||||
<div className={ styles.wallet }>
|
||||
{ this.renderEditDialog(wallet) }
|
||||
{ this.renderSettingsDialog() }
|
||||
{ this.renderTransferDialog() }
|
||||
{ this.renderDeleteDialog(wallet) }
|
||||
{ this.renderActionbar() }
|
||||
@@ -212,13 +215,18 @@ class Wallet extends Component {
|
||||
<Button
|
||||
key='delete'
|
||||
icon={ <ActionDelete /> }
|
||||
label='delete wallet'
|
||||
label='delete'
|
||||
onClick={ this.showDeleteDialog } />,
|
||||
<Button
|
||||
key='editmeta'
|
||||
icon={ <ContentCreate /> }
|
||||
label='edit'
|
||||
onClick={ this.onEditClick } />
|
||||
onClick={ this.onEditClick } />,
|
||||
<Button
|
||||
key='settings'
|
||||
icon={ <SettingsIcon /> }
|
||||
label='settings'
|
||||
onClick={ this.onSettingsClick } />
|
||||
];
|
||||
|
||||
return (
|
||||
@@ -250,11 +258,27 @@ class Wallet extends Component {
|
||||
return (
|
||||
<EditMeta
|
||||
account={ wallet }
|
||||
keys={ ['description', 'passwordHint'] }
|
||||
keys={ ['description'] }
|
||||
onClose={ this.onEditClick } />
|
||||
);
|
||||
}
|
||||
|
||||
renderSettingsDialog () {
|
||||
const { wallet } = this.props;
|
||||
const { showSettingsDialog } = this.state;
|
||||
|
||||
if (!showSettingsDialog) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<WalletSettings
|
||||
wallet={ wallet }
|
||||
onClose={ this.onSettingsClick }
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
renderTransferDialog () {
|
||||
const { showTransferDialog } = this.state;
|
||||
|
||||
@@ -281,6 +305,12 @@ class Wallet extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
onSettingsClick = () => {
|
||||
this.setState({
|
||||
showSettingsDialog: !this.state.showSettingsDialog
|
||||
});
|
||||
}
|
||||
|
||||
onTransferClick = () => {
|
||||
this.setState({
|
||||
showTransferDialog: !this.state.showTransferDialog
|
||||
|
||||
Reference in New Issue
Block a user