Skip to content

Commit

Permalink
Merge pull request #366 from poanetwork/vb-fix-custom-symbol-max-length
Browse files Browse the repository at this point in the history
Increase max token symbol length up to 22
  • Loading branch information
vbaranov committed Apr 29, 2020
2 parents d228a9c + 051813f commit 89466a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions old-ui/app/components/add-token/add-token.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 })
Expand Down

0 comments on commit 89466a2

Please sign in to comment.