aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-06-29 04:08:43 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-06-29 04:08:43 +0800
commit4be704097fa8892928f10020f3c0803451cfc31d (patch)
treeda997391fd2c11576ea1a1d8726455e18fc6bef7
parentf9540cf48c9f7e42c41e9e1648bb57ee2b5d441f (diff)
parent2fd03a60fb8c536dbe56c86e1836935616ea14d8 (diff)
downloadtangerine-wallet-browser-4be704097fa8892928f10020f3c0803451cfc31d.tar
tangerine-wallet-browser-4be704097fa8892928f10020f3c0803451cfc31d.tar.gz
tangerine-wallet-browser-4be704097fa8892928f10020f3c0803451cfc31d.tar.bz2
tangerine-wallet-browser-4be704097fa8892928f10020f3c0803451cfc31d.tar.lz
tangerine-wallet-browser-4be704097fa8892928f10020f3c0803451cfc31d.tar.xz
tangerine-wallet-browser-4be704097fa8892928f10020f3c0803451cfc31d.tar.zst
tangerine-wallet-browser-4be704097fa8892928f10020f3c0803451cfc31d.zip
Merge branch 'master' into title-truncate
-rw-r--r--CHANGELOG.md2
-rw-r--r--app/scripts/lib/notifications.js4
-rw-r--r--app/scripts/popup.js10
-rw-r--r--ui/app/app.js1
-rw-r--r--ui/app/components/editable-label.js6
-rw-r--r--ui/app/send.js6
6 files changed, 23 insertions, 6 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/app/scripts/lib/notifications.js b/app/scripts/lib/notifications.js
index a5746ae6e..a31949108 100644
--- a/app/scripts/lib/notifications.js
+++ b/app/scripts/lib/notifications.js
@@ -176,7 +176,7 @@ function renderNotificationSVG(content, cb){
}
function svgWrapper(content){
- var wrapperSource = `
+ var wrapperSource = `
<svg xmlns="http://www.w3.org/2000/svg" width="450" height="300">
<foreignObject x="0" y="0" width="100%" height="100%">
<body xmlns="http://www.w3.org/1999/xhtml" height="100%">{{content}}</body>
@@ -188,4 +188,4 @@ function svgWrapper(content){
function toSvgUri(content){
return 'data:image/svg+xml;utf8,' + encodeURIComponent(content)
-} \ No newline at end of file
+}
diff --git a/app/scripts/popup.js b/app/scripts/popup.js
index 5173507fa..5c5cf0455 100644
--- a/app/scripts/popup.js
+++ b/app/scripts/popup.js
@@ -65,11 +65,21 @@ function getCurrentDomain (cb) {
})
}
+function clearNotifications(){
+ chrome.notifications.getAll(function (object) {
+ for (let notification in object){
+ chrome.notifications.clear(notification)
+ }
+ })
+}
+
function setupApp (err, opts) {
if (err) {
alert(err.stack)
throw err
}
+
+ clearNotifications()
var container = document.getElementById('app-content')
diff --git a/ui/app/app.js b/ui/app/app.js
index 8a51f968b..80521d220 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -355,4 +355,3 @@ App.prototype.toggleMetamaskActive = function () {
this.props.dispatch(actions.lockMetamask(false))
}
}
-
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 })
}
diff --git a/ui/app/send.js b/ui/app/send.js
index 4b501a7b5..540d85382 100644
--- a/ui/app/send.js
+++ b/ui/app/send.js
@@ -216,6 +216,11 @@ SendTransactionScreen.prototype.onSubmit = function () {
return this.props.dispatch(actions.displayWarning(message))
}
+ if (input < 0) {
+ message = 'Can not send negative amounts of ETH.'
+ return this.props.dispatch(actions.displayWarning(message))
+ }
+
if ((!util.isValidAddress(recipient) && !txData) || (!recipient && !txData)) {
message = 'Recipient address is invalid.'
return this.props.dispatch(actions.displayWarning(message))
@@ -234,4 +239,3 @@ SendTransactionScreen.prototype.onSubmit = function () {
this.props.dispatch(actions.signTx(txParams))
}
-