aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md2
-rw-r--r--ui/app/components/editable-label.js6
2 files changed, 6 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e70ef5e51..25a5fedb3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,8 @@
- Fixed bug where MetaMask interfered with PDF loading.
- Moved switch account icon into menu bar.
- Changed status shapes to be a yellow warning sign for failure and ellipsis for pending transactions.
+- Now enforce 30 character limit on wallet names.
+
## 2.4.4 2016-06-23
diff --git a/ui/app/components/editable-label.js b/ui/app/components/editable-label.js
index 3d7ca17d4..05ffd4c92 100644
--- a/ui/app/components/editable-label.js
+++ b/ui/app/components/editable-label.js
@@ -18,6 +18,7 @@ EditableLabel.prototype.render = function () {
return h('div.editable-label', [
h('input.sizing-input', {
defaultValue: props.textValue,
+ maxLength: '30',
onKeyPress: (event) => {
this.saveIfEnter(event)
},
@@ -44,6 +45,7 @@ EditableLabel.prototype.saveIfEnter = function (event) {
EditableLabel.prototype.saveText = function () {
var container = findDOMNode(this)
var text = container.querySelector('.editable-label input').value
- this.props.saveText(text)
- this.setState({ isEditingLabel: false, textLabel: text })
+ var truncatedText = text.substring(0, 30)
+ this.props.saveText(truncatedText)
+ this.setState({ isEditingLabel: false, textLabel: truncatedText })
}