aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Serrano <kevin.serrano@consensys.net>2017-10-26 02:52:16 +0800
committerKevin Serrano <kevin.serrano@consensys.net>2017-10-26 02:52:16 +0800
commit4903f3e71a0b2a8b4b0d212b61d6efae78f29f8f (patch)
treee3ee6873e5aedeb94f47d540fb8e8de5cc1c67a7
parente7a22fc62bc8063ed89ddbaccd34e6311e2a6017 (diff)
downloadtangerine-wallet-browser-4903f3e71a0b2a8b4b0d212b61d6efae78f29f8f.tar
tangerine-wallet-browser-4903f3e71a0b2a8b4b0d212b61d6efae78f29f8f.tar.gz
tangerine-wallet-browser-4903f3e71a0b2a8b4b0d212b61d6efae78f29f8f.tar.bz2
tangerine-wallet-browser-4903f3e71a0b2a8b4b0d212b61d6efae78f29f8f.tar.lz
tangerine-wallet-browser-4903f3e71a0b2a8b4b0d212b61d6efae78f29f8f.tar.xz
tangerine-wallet-browser-4903f3e71a0b2a8b4b0d212b61d6efae78f29f8f.tar.zst
tangerine-wallet-browser-4903f3e71a0b2a8b4b0d212b61d6efae78f29f8f.zip
Add labels to clarify warning.
-rw-r--r--ui/app/components/bn-as-decimal-input.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/app/components/bn-as-decimal-input.js b/ui/app/components/bn-as-decimal-input.js
index 000ac22c8..22e37602e 100644
--- a/ui/app/components/bn-as-decimal-input.js
+++ b/ui/app/components/bn-as-decimal-input.js
@@ -130,17 +130,17 @@ BnAsDecimalInput.prototype.updateValidity = function (event) {
}
BnAsDecimalInput.prototype.constructWarning = function () {
- const { name, min, max, scale } = this.props
+ const { name, min, max, scale, suffix } = this.props
const newMin = min && this.downsize(min.toString(10), scale)
const newMax = max && this.downsize(max.toString(10), scale)
let message = name ? name + ' ' : ''
if (min && max) {
- message += `must be greater than or equal to ${newMin} and less than or equal to ${newMax}.`
+ message += `must be greater than or equal to ${newMin} ${suffix} and less than or equal to ${newMax} ${suffix}.`
} else if (min) {
- message += `must be greater than or equal to ${newMin}.`
+ message += `must be greater than or equal to ${newMin} ${suffix}.`
} else if (max) {
- message += `must be less than or equal to ${newMax}.`
+ message += `must be less than or equal to ${newMax} ${suffix}.`
} else {
message += 'Invalid input.'
}