Skip to content

Commit

Permalink
Merge pull request #408 from aeternity/release/3.2.1
Browse files Browse the repository at this point in the history
Release 3.2.1
  • Loading branch information
nduchak authored May 16, 2019
2 parents 0877fd0 + 8b48bc7 commit 1e6a544
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 42 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# [3.2.1](https://github.com/aeternity/aepp-sdk-js/compare/2.4.0...3.2.1) (2019-05-16)


### Bug Fixes

* **Joi:** Add `JOI` browser comparability



# [3.2.0](https://github.com/aeternity/aepp-sdk-js/compare/2.4.0...3.2.0) (2019-05-16)


Expand Down
2 changes: 1 addition & 1 deletion es/contract/aci.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import AsyncInit from '../utils/async-init'
import { decode } from '../tx/builder/helpers'
import { encodeBase58Check } from '../utils/crypto'
import { toBytes } from '../utils/bytes'
import Joi from '@hapi/joi'
import Joi from 'joi-browser'

const SOPHIA_TYPES = [
'int',
Expand Down
38 changes: 10 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aeternity/aepp-sdk",
"version": "3.2.0",
"version": "3.2.1",
"description": "SDK for the æternity blockchain",
"main": "dist/aepp-sdk.js",
"browser": "dist/aepp-sdk.browser.js",
Expand Down Expand Up @@ -28,7 +28,6 @@
"dependencies": {
"@aeternity/bip39": "^0.1.0",
"@babel/runtime": "^7.0.0-beta.46",
"@hapi/joi": "^15.0.1",
"@stamp/it": "^1.0.3",
"@stamp/required": "^1.0.1",
"aes-js": "^3.1.1",
Expand All @@ -39,6 +38,7 @@
"blakejs": "^1.1.0",
"bs58check": "^2.1.1",
"commander": "^2.14.1",
"joi-browser": "^13.4.0",
"libsodium-wrappers-sumo": "0.7.3",
"json-bigint": "github:davidyuk/json-bigint",
"ramda": "^0.25.0",
Expand Down
18 changes: 9 additions & 9 deletions test/integration/contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ describe('Contract', function () {
try {
await contractObject.call('intFn', ['asd'])
} catch (e) {
e.message.should.be.equal('"Argument" at position 0 fails because [Value "asd" at path: [0] not a number]')
e.message.should.be.equal('"Argument" at position 0 fails because [Value "[asd]" at path: [0] not a number]')
}
})
it('Valid', async () => {
Expand All @@ -214,14 +214,14 @@ describe('Contract', function () {
try {
await contractObject.call('addressFn', ['asdasasd'])
} catch (e) {
e.message.should.be.equal('"Argument" at position 0 fails because ["[asdasasd]" must be a number, "[asdasasd]" with value "asdasasd" fails to match the required pattern: /^(ak_|ct_|ok_|oq_)/]')
e.message.should.be.equal('"Argument" at position 0 fails because ["0" must be a number, "0" with value "asdasasd" fails to match the required pattern: /^(ak_|ct_|ok_|oq_)/]')
}
})
it('Invalid address type', async () => {
try {
await contractObject.call('addressFn', [333])
} catch (e) {
e.message.should.be.equal('"Argument" at position 0 fails because ["[333]" must be less than or equal to 0, Value "333" at path: [0] not a string]')
e.message.should.be.equal('"Argument" at position 0 fails because ["0" must be less than or equal to 0, Value "333" at path: [0] not a string]')
}
})
it('Empty address', async () => {
Expand Down Expand Up @@ -256,7 +256,7 @@ describe('Contract', function () {
try {
await contractObject.call('tupleFn', [[1, 'string']])
} catch (e) {
e.message.should.be.equal('"Argument" at position 0 fails because ["[1,string]" at position 0 fails because [Value "1" at path: [0,0] not a string], "[1,string]" at position 1 fails because [Value "string" at path: [0,1] not a number]]')
e.message.should.be.equal('"Argument" at position 0 fails because ["[1,string]" at position 0 fails because [Value "1" at path: [0,0] not a string], "[1,string]" at position 1 fails because [Value "1" at path: [0,1] not a number]]')
}
})
it('Required tuple prop', async () => {
Expand All @@ -270,7 +270,7 @@ describe('Contract', function () {
try {
await contractObject.call('tupleWithList', [[[true], 1]])
} catch (e) {
e.message.should.be.equal('"Argument" at position 0 fails because ["[true,1]" at position 0 fails because ["0" at position 0 fails because [Value "true" at path: [0,0,0] not a number]]]')
e.message.should.be.equal('"Argument" at position 0 fails because ["[true,1]" at position 0 fails because ["0" at position 0 fails because [Value "0" at path: [0,0,0] not a number]]]')
}
})
it('Wrong type in tuple inside tuple', async () => {
Expand All @@ -296,14 +296,14 @@ describe('Contract', function () {
try {
await contractObject.call('listFn', [[1, 'string']])
} catch (e) {
e.message.should.be.equal('"Argument" at position 0 fails because ["[1,string]" at position 1 fails because [Value "string" at path: [0,1] not a number]]')
e.message.should.be.equal('"Argument" at position 0 fails because ["[1,string]" at position 1 fails because [Value "1" at path: [0,1] not a number]]')
}
})
it('Invalid list element type nested', async () => {
try {
await contractObject.call('listInListFn', [[['childListWronmgElement'], 'parentListWrongElement']])
} catch (e) {
e.message.should.be.equal('"Argument" at position 0 fails because ["[childListWronmgElement,parentListWrongElement]" at position 0 fails because ["0" at position 0 fails because [Value "childListWronmgElement" at path: [0,0,0] not a number]], "[childListWronmgElement,parentListWrongElement]" at position 1 fails because [Value "1" at path: [0,1] not a array]]')
e.message.should.be.equal('"Argument" at position 0 fails because ["[childListWronmgElement,parentListWrongElement]" at position 0 fails because ["0" at position 0 fails because [Value "0" at path: [0,0,0] not a number]], "[childListWronmgElement,parentListWrongElement]" at position 1 fails because [Value "1" at path: [0,1] not a array]]')
}
})
})
Expand Down Expand Up @@ -389,7 +389,7 @@ describe('Contract', function () {
try {
await contractObject.call('setRecord', [{ value: 123, key: 'test' }])
} catch (e) {
e.message.should.be.equal('"Argument" at position 0 fails because [child "value" fails because [Value "123" at path: [0,value] not a string], child "key" fails because [Value "test" at path: [0,key] not a number]]')
e.message.should.be.equal('"Argument" at position 0 fails because [child "value" fails because [Value "123" at path: [0,value] not a string], child "key" fails because [Value "key" at path: [0,key] not a number]]')
}
})
})
Expand All @@ -413,7 +413,7 @@ describe('Contract', function () {
try {
await contractObject.call('intOption', [{ s: 2 }])
} catch (e) {
e.message.should.be.equal('"Argument" at position 0 fails because [Value \'"s":2\' at path: [0] not a Promise]')
e.message.should.be.equal('"Argument" at position 0 fails because [Value \'[[object Object]]\' at path: [0] not a Promise]')
}
})
})
Expand Down
4 changes: 2 additions & 2 deletions test/unit/crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import '../'
import { describe, it } from 'mocha'
import { assert, expect } from 'chai'
import * as Crypto from '../../es/utils/crypto'
import { addressToHex } from '../../es/utils/crypto'
import { encodeBase58Check } from '../../es/utils/crypto'

import { addressToHex, encodeBase58Check } from '../../es/utils/crypto'

// These keys are fixations for the encryption lifecycle tests and will
// not be used for signing
Expand Down

0 comments on commit 1e6a544

Please sign in to comment.