(str: string)
| 186 | } |
| 187 | |
| 188 | function toUpper(str: string): string { |
| 189 | let result = ''; |
| 190 | for (let i = 0; i < str.length; i++) { |
| 191 | let charCode = str.charCodeAt(i); |
| 192 | // only operate on lowercase 'a' thru lower case 'z' |
| 193 | if (charCode >= 97 && charCode <= 122) { |
| 194 | result += String.fromCharCode(charCode - 32); |
| 195 | } else { |
| 196 | result += str.charAt(i); |
| 197 | } |
| 198 | } |
| 199 | return result; |
| 200 | } |
| 201 | |
| 202 | function fetchTokenSymbol(tokenAddress: Address): string { |
| 203 | let staticToken = StaticToken.fromAddress(tokenAddress); |