Skip to content
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

Template strings are not interpolated in mapping.ts #2171

Closed
liamzebedee opened this issue Feb 8, 2021 · 1 comment
Closed

Template strings are not interpolated in mapping.ts #2171

liamzebedee opened this issue Feb 8, 2021 · 1 comment
Assignees

Comments

@liamzebedee
Copy link

Do you want to request a feature or report a bug?
Bug.

What is the current behavior?
Template strings are not interpolated in mapping.ts.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
I encountered this while reconstructing an IPFS CID from a 32 byte sha256 digest value.

// This doesn't evaluate hashDigest.toHexString().slice(2).
// Instead it just returns the raw string.
const hexStringConcatenated = `1220${hashDigest.toHexString().slice(2)}`

// Workaround.
const hexStringConcatenated = `1220` + hashDigest.toHexString().slice(2)

log.info("New market with CID {}", [cid])

What is the expected behavior?
ES6 Template Strings are interpolated correctly.

@tilacog tilacog self-assigned this Feb 25, 2021
@tilacog
Copy link
Contributor

tilacog commented Feb 25, 2021

Mappings are not written in ES6 but in AssemblyScript, which still doesn't seems to support template strings.

This is the relevant issue on their repository:
AssemblyScript/assemblyscript#466

@tilacog tilacog closed this as completed Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants