From ed841f71965771b07f85db11436ed05d7adbbcc1 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Wed, 29 Apr 2020 11:09:38 +0300 Subject: [PATCH 1/2] Increase max token symbol length up to 12 --- CHANGELOG.md | 1 + old-ui/app/components/add-token/add-token.component.js | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6c68aae7..a34d48bc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/old-ui/app/components/add-token/add-token.component.js b/old-ui/app/components/add-token/add-token.component.js index 546fca16a..9845960ee 100644 --- a/old-ui/app/components/add-token/add-token.component.js +++ b/old-ui/app/components/add-token/add-token.component.js @@ -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 < 12 if (!validSymbol) { - msg += 'Symbol must be between 0 and 10 characters.' + msg += 'Symbol must be between 0 and 12 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 >= 12) { + customSymbolError = 'Symbol must be between 0 and 12 characters.' /* this.context.t('symbolBetweenZeroTen')*/ } this.setState({ customSymbol, customSymbolError }) From 051813f1f3b6ccaa24788d829a9ceed400c4c0f0 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Wed, 29 Apr 2020 13:10:04 +0300 Subject: [PATCH 2/2] Extend available Symbol length to 22 to support yDAI+yUSDC+yUSDT+yTUSD --- old-ui/app/components/add-token/add-token.component.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/old-ui/app/components/add-token/add-token.component.js b/old-ui/app/components/add-token/add-token.component.js index 9845960ee..4bbb92583 100644 --- a/old-ui/app/components/add-token/add-token.component.js +++ b/old-ui/app/components/add-token/add-token.component.js @@ -368,9 +368,9 @@ export default class AddTokenScreen extends Component { } const symbolLen = symbol.trim().length - const validSymbol = symbolLen > 0 && symbolLen < 12 + const validSymbol = symbolLen > 0 && symbolLen < 23 if (!validSymbol) { - msg += 'Symbol must be between 0 and 12 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 >= 12) { - customSymbolError = 'Symbol must be between 0 and 12 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 })