bigchaindb / js-bigchaindb-driver

Official BigchainDB JavaScript driver for Node.js and the browser
https://docs.bigchaindb.com/projects/js-driver/en/latest/usage.html
Apache License 2.0
216 stars 92 forks source link

Wrap Uint8Array in a Buffer #265

Closed DavidEdwards closed 5 years ago

DavidEdwards commented 5 years ago

base-x is throwing an Exception due to it being passed a Uint8Array instead of a Buffer. This will simply wrap it in a Buffer.

Fixed #264

ttmc commented 5 years ago

Hi @DavidEdwards

Before we can merge this pull request, we need you or your organization to agree to one of our contributor agreements. One of the big concerns for people using and developing open source software is that someone who contributed to the code might claim the code infringes on their copyright or patent. To guard against this, we ask all our contributors to sign a Contributor License Agreement. This gives us the right to use the code contributed and any patents the contribution relies on. It also gives us and our users comfort that they won't be sued for using open source software. We know it's a hassle, but it makes the project more reliable in the long run. Thank you for your understanding and your contribution!

If you are contributing on behalf of yourself (and not on behalf of your employer or another organization you are part of) then you should:

  1. Go to: https://www.bigchaindb.com/cla/
  2. Read the Individual Contributor Agreement
  3. Fill in the form "For Individuals"
  4. Check the box to agree
  5. Click the SEND button

If you're contributing as an employee, and/or you want all employees of your employing organization to be covered by our contributor agreement, then someone in your organization with the authority to enter agreements on behalf of all employees must do the following:

  1. Go to: https://www.bigchaindb.com/cla/
  2. Read the Entity Contributor Agreement
  3. Fill in the form "For Organizations”
  4. Check the box to agree
  5. Click the SEND button

We will email you (or your employer) with further instructions.

DavidEdwards commented 5 years ago

BEGIN BLOCK

This is to confirm that I agreed to and accepted the BigchainDB Individual Contributor Agreement at https://www.bigchaindb.com/cla/ and to represent and warrant that I have authority to do so.

sM1f2z6H1Dd4I5gMxYYkwCQrNWjZFHISi2jRNin99To8tPiQ7AFkbqBEquzINXA

END BLOCK

ttmc commented 5 years ago

Thanks @DavidEdwards that completes the CLA step. I asked @jernejpregelj to review your PR.

jernejpregelj commented 5 years ago

Hi, @DavidEdwards can you provide more information about environment where you integrating bigchaindb-driver to get this error?

DavidEdwards commented 5 years ago

Sure. I started investigating BigChainDB for a project. So my experience with it in general is limited. I ran through the quickstart set up. So all versions should be the most current.

Operating System:

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:    18.04
Codename:   bionic

Node: v10.11.0 bigchaindb-driver: ^4.1.0

Though judging from the Exception, this really should be platform independent.

The Exception is thrown due to this function call that is called from base-x.

DavidEdwards commented 5 years ago

Interestingly, that was added 7 months ago. So I would have expected more people to report the issue.

https://github.com/cryptocoinjs/base-x/commit/6cbf08a7d7ddc51bb1055cedc60a4dd9371ee433

Do you not have this issue?