Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Capitalisation of token Symbol not accepted #1

Open
DenysOf opened this issue May 18, 2021 · 1 comment
Open

Capitalisation of token Symbol not accepted #1

DenysOf opened this issue May 18, 2021 · 1 comment

Comments

@DenysOf
Copy link

DenysOf commented May 18, 2021

A token contract is created with token symbol in CAPS, but view function only accepts the lower case

View call: token-factory.testnet.get_token({"token_id": "FT"})
null
View call: token-factory.testnet.get_token({"token_id": "ft"})
{
  owner_id: 'ftoken.testnet',
  total_supply: '1000000000000000000000',
  metadata: {
    spec: 'ft-1.0.0',
    name: 'FToken',
    symbol: 'FT',
    icon: '',
    reference: null,
    reference_hash: null,
    decimals: 18
  }
}

symbol: 'FT'

@willemneal
Copy link

Yes it seems the reason is here:

let token_id = args.metadata.symbol.to_ascii_lowercase();

It seems the fix would be to make the argument lower case in get_token.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants