Merge pull request #366 from poanetwork/vb-fix-custom-symbol-max-length

Increase max token symbol length up to 22
This commit is contained in:
Victor Baranov 2020-04-29 13:29:17 +03:00 committed by GitHub
commit 89466a2c55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -2,6 +2,7 @@
## Current Master
- [#366](https://github.com/poanetwork/nifty-wallet/pull/366) - (Fix) Increase max token symbol length up to 12
- [#363](https://github.com/poanetwork/nifty-wallet/pull/363) - (Fix) token decimals display in pending tx screen
## 5.0.2 Thu Apr 16 2020

View File

@ -368,9 +368,9 @@ export default class AddTokenScreen extends Component {
}
const symbolLen = symbol.trim().length
const validSymbol = symbolLen > 0 && symbolLen < 10
const validSymbol = symbolLen > 0 && symbolLen < 23
if (!validSymbol) {
msg += 'Symbol must be between 0 and 10 characters.'
msg += 'Symbol must be between 0 and 23 characters.'
}
let ownAddress = identitiesList.includes(standardAddress)
@ -527,8 +527,8 @@ export default class AddTokenScreen extends Component {
const symbolLength = customSymbol.length
let customSymbolError = null
if (symbolLength <= 0 || symbolLength >= 10) {
customSymbolError = 'Symbol must be between 0 and 10 characters.' /* this.context.t('symbolBetweenZeroTen')*/
if (symbolLength <= 0 || symbolLength >= 23) {
customSymbolError = 'Symbol must be between 0 and 23 characters.' /* this.context.t('symbolBetweenZeroTen')*/
}
this.setState({ customSymbol, customSymbolError })