Skip to content

Template strings are not interpolated in mapping.ts #2171

Closed
@liamzebedee

Description

@liamzebedee

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions