Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:
- name: Test Types
run: |
yarn test-types
- name: Test Nested Containers
run: |
yarn test-nested-containers
- name: Build
run: |
yarn build-web
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/publish-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ jobs:
- name: Test Types
run: |
yarn test-types
- name: Test Nested Containers
run: |
yarn test-nested-containers
- name: Build
run: |
yarn build-web
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ jobs:
- name: Test Types
run: |
yarn test-types
- name: Test Nested Containers
run: |
yarn test-nested-containers
- name: Build
run: |
yarn build-web
Expand Down Expand Up @@ -107,6 +110,9 @@ jobs:
- name: Test Types
run: |
yarn test-types
- name: Test Nested Containers
run: |
yarn test-nested-containers
- name: Build
run: |
yarn build-web
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
"test": "jest src/tests/*eosjs* --coverage --coverageDirectory './coverage/test'",
"test-node": "jest src/tests/*node*",
"test-node-coverage": "jest src/tests/*node* --coverage --coverageDirectory './coverage/test-node'",
"test-nested-containers": "jest src/tests/nested-containers.test.ts --coverage --coverageDirectory './coverage/nested-containers'",
"test-types": "jest src/tests/type-checks.test.ts --coverage --coverageDirectory './coverage/test-types'",
"test-all": "yarn test && yarn test-node && yarn test-types && yarn cypress",
"test-all": "yarn test && yarn test-node && yarn test-types && yarn test-nested-containers && yarn cypress",
"build": "rimraf dist && tsc -p ./tsconfig.json",
"build-web": "webpack --config webpack.prod.js && webpack --config webpack.debug.js",
"build-production": "yarn build && yarn build-web && yarn test-all",
Expand All @@ -39,9 +40,9 @@
"@cypress/skip-test": "^2.6.1",
"@types/elliptic": "^6.4.14",
"@types/jest": "^26.0.24",
"@types/node": "^14.18.0",
"@types/node": "^14.18.5",
"@types/node-fetch": "^2.5.12",
"@types/pako": "^1.0.2",
"@types/pako": "^1.0.3",
"@types/ripemd160": "^2.0.0",
"atob": "^2.1.2",
"btoa": "^1.2.1",
Expand Down
6 changes: 6 additions & 0 deletions src/eosjs-serialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,12 @@ function serializeStruct(
if (this.base) {
this.base.serialize(buffer, data, state, allowExtensions);
}
if (Array.isArray(data)) { // Tuple
this.fields.forEach((field: Field, index: number) => {
field.type.serialize(buffer, data[index], state, allowExtensions);
});
return;
}
for (const field of this.fields) {
if (field.name in data) {
if (state.skippedBinaryExtension) {
Expand Down
654 changes: 654 additions & 0 deletions src/tests/nested-containers.test.ts

Large diffs are not rendered by default.

527 changes: 266 additions & 261 deletions yarn.lock

Large diffs are not rendered by default.