-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update token ticker validation rules #573
Update token ticker validation rules #573
Conversation
package.json
Outdated
@@ -81,4 +81,4 @@ | |||
"@multiversx/sdk-bls-wasm": "0.3.5", | |||
"bip39": "3.1.0" | |||
} | |||
} | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add empty line
src/tokens.spec.ts
Outdated
@@ -46,6 +46,22 @@ describe("test tokens and token computer", async () => { | |||
const fungibleTokenIdentifier = "FNG-123456"; | |||
identifier = tokenComputer.extractIdentifierFromExtendedIdentifier(fungibleTokenIdentifier); | |||
assert.equal(identifier, "FNG-123456"); | |||
|
|||
const numericTokenTicker = "2024-45a190"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we double check if lowercase ticker is accepted on the network?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From here I understand that we can not have lowercase
https://github.com/multiversx/mx-chain-go/blob/master/vm/systemSmartContracts/esdt.go#L721
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, thank you.
src/tokens.spec.ts
Outdated
@@ -46,6 +46,22 @@ describe("test tokens and token computer", async () => { | |||
const fungibleTokenIdentifier = "FNG-123456"; | |||
identifier = tokenComputer.extractIdentifierFromExtendedIdentifier(fungibleTokenIdentifier); | |||
assert.equal(identifier, "FNG-123456"); | |||
|
|||
const numericTokenTicker = "2024-45a190"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use a more artificial example (not the token from mainnet).
src/tokens.spec.ts
Outdated
@@ -46,6 +46,22 @@ describe("test tokens and token computer", async () => { | |||
const fungibleTokenIdentifier = "FNG-123456"; | |||
identifier = tokenComputer.extractIdentifierFromExtendedIdentifier(fungibleTokenIdentifier); | |||
assert.equal(identifier, "FNG-123456"); | |||
|
|||
const numericTokenTicker = "2024-45a190"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.