Skip to content
This repository was archived by the owner on Aug 24, 2021. It is now read-only.
This repository was archived by the owner on Aug 24, 2021. It is now read-only.

Incompatibility with "zii" #80

Closed
@KyleMaas

Description

@KyleMaas

Describe the bug
If the package "zii" is installed due to a dependency somewhere else in an npm project including js-multibase (in my case, from ipfs-repo-migrations from ipfs-core), this function:

function encoding (nameOrCode) {

...no longer works for types which use a code of "z". This happens in my case from here:

https://github.com/ipfs/js-ipfs-repo-migrations/blob/425d53c5f2ef2d89b11d2cfc33362d5ebfad81a5/migrations/migration-9/utils.js#L10

To Reproduce
Steps to reproduce the behavior:

  1. npm install js-multibase
  2. npm install zii
  3. Require both so they are pulled into your project.
  4. Try to decode "zQmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n"

Expected behavior
It decodes.

Actual behavior
I get this error: TypeError: enc.decode is not a function

Desktop (please complete the following information):

  • OS: Gentoo Linux
  • Browser: Chromium
  • Version: 87

Metadata

Metadata

Assignees

No one assigned

    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