alpha-wallet-android icon indicating copy to clipboard operation
alpha-wallet-android copied to clipboard

ticker length

Open ravi19821982 opened this issue 1 year ago • 3 comments

hello

i want to know one ofyour token ticker size is 6 words

so from where i can change the ticker length size attaching screenshot WhatsApp Image 2023-04-28 at 16 18 41

ravi19821982 avatar Apr 28 '23 11:04 ravi19821982

please help me gamiso have 6 chareter ticker same as token name ticker is GAMISO but here i can see 5 character only so how can i do it 6 in code

ravi19821982 avatar Apr 28 '23 15:04 ravi19821982

Hi @ravi19821982 is this the symbol name? eg in you picture, "BNB", "BNB_U", "BUSD", "GAMIS"?

If so, you can change it in this class:

class TokenHolder

look for this line:

String symbol = token.getSymbol().substring(0, Math.min(token.getSymbol().length(), 5)).toUpperCase();

change the 5 in this line to 6 or whatever you like. It might not be a bad refactor: you could submit a PR where that '5' has a global static value, probably in class Token at the top, and it would be something like:

public static final int MAX_TOKEN_SYMBOL_LENGTH = 6;

JamesSmartCell avatar Apr 29 '23 00:04 JamesSmartCell

Hey @JamesSmartCell , I wanted to begin contributing to this repo and came across this issue so I picked it up. I have increased the max limit of the symbol length to 8 so that tokens with longer ticker names can also be accomodated.

Please find the PR here - https://github.com/AlphaWallet/alpha-wallet-android/pull/3264

pratikmhatre avatar Jul 31 '23 10:07 pratikmhatre