First draft of the MultiSig Wallet (#3700)

* Wallet Creation Modal #3282

* Name and description to Wallet #3282

* Add Wallet to the Account Page and Wallet Page #3282

* Fix Linting

* Crete MobX store for Transfer modal

* WIP Wallet Redux Store

* Basic Details for Wallet #3282

* Fixing linting

* Refactoring Transfer store for Wallet

* Working wallet init transfer #3282

* Optional gas in MethodDecoding + better input

* Show confirmations for Wallet #3282

* Order confirmations

* Method Decoding selections

* MultiSig txs and confirm pending #3282

* MultiSig Wallet Revoke #3282

* Confirmations and Txs Update #3282

* Feedback for Confirmations #3282

* Merging master fixes...

* Remove unused CSS
This commit is contained in:
Nicolas Gotchac
2016-12-06 09:37:59 +01:00
committed by Jaco Greeff
parent ad36743122
commit bec3539651
47 changed files with 3202 additions and 160 deletions

View File

@@ -21,12 +21,30 @@
.input input {
padding-left: 48px !important;
box-sizing: border-box;
&.small {
padding-left: 40px !important;
}
}
.inputEmpty input {
padding-left: 0 !important;
}
.small {
.input input {
padding-left: 40px !important;
}
.icon,
.iconDisabled {
img {
height: 24px;
width: 24px;
}
}
}
.icon,
.iconDisabled {
position: absolute;
@@ -35,6 +53,14 @@
&.noLabel {
top: 10px;
}
&.noCopy {
left: 5px;
}
&.noUnderline {
top: 0;
}
}
.icon {

View File

@@ -36,22 +36,38 @@ class InputAddress extends Component {
tokens: PropTypes.object,
text: PropTypes.bool,
onChange: PropTypes.func,
onSubmit: PropTypes.func
onSubmit: PropTypes.func,
hideUnderline: PropTypes.bool,
allowCopy: PropTypes.bool,
small: PropTypes.bool
};
static defaultProps = {
allowCopy: true,
hideUnderline: false,
small: false
};
render () {
const { className, disabled, error, label, hint, value, text, onSubmit, accountsInfo, tokens } = this.props;
const { className, disabled, error, label, hint, value, text } = this.props;
const { small, allowCopy, hideUnderline, onSubmit, accountsInfo, tokens } = this.props;
const account = accountsInfo[value] || tokens[value];
const hasAccount = account && (!account.meta || !account.meta.deleted);
const hasAccount = account && !(account.meta && account.meta.deleted);
const icon = this.renderIcon();
const classes = [ className ];
classes.push(!icon ? styles.inputEmpty : styles.input);
const containerClasses = [ styles.container ];
if (small) {
containerClasses.push(styles.small);
}
return (
<div className={ styles.container }>
<div className={ containerClasses.join(' ') }>
<Input
className={ classes.join(' ') }
disabled={ disabled }
@@ -61,7 +77,8 @@ class InputAddress extends Component {
value={ text && hasAccount ? account.name : value }
onChange={ this.handleInputChange }
onSubmit={ onSubmit }
allowCopy={ disabled ? value : false }
allowCopy={ allowCopy && (disabled ? value : false) }
hideUnderline={ hideUnderline }
/>
{ icon }
</div>
@@ -69,7 +86,7 @@ class InputAddress extends Component {
}
renderIcon () {
const { value, disabled, label } = this.props;
const { value, disabled, label, allowCopy, hideUnderline } = this.props;
if (!value || !value.length || !util.isAddressValid(value)) {
return null;
@@ -81,6 +98,14 @@ class InputAddress extends Component {
classes.push(styles.noLabel);
}
if (!allowCopy) {
classes.push(styles.noCopy);
}
if (hideUnderline) {
classes.push(styles.noUnderline);
}
return (
<div className={ classes.join(' ') }>
<IdentityIcon