Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix get account issue 182 #186

Merged
merged 3 commits into from
Sep 19, 2022
Merged
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
5 changes: 5 additions & 0 deletions .changeset/poor-sloths-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@onflow/flow-js-testing": patch
---

No longer compress the packaged version of the library
5 changes: 5 additions & 0 deletions .changeset/rude-turtles-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@onflow/flow-js-testing": patch
---

Add explicit scoping to arguments in nested await functions to hint microbunde into doing the right thing
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ jobs:
- name: Lint
run: npm run lint
- name: Test
run: npm run test
run: npm run test -- --maxConcurrency=50
- name: Check license headers
run: ./check-headers.sh
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"flow-js-testing": "./bin/index.js"
},
"scripts": {
"build": "microbundle",
"build": "microbundle --no-compress",
"generate-code": "node_modules/.bin/flow-generate -i ./cadence -o ./src/generated",
"lint": "eslint -c .eslintrc.js src",
"check-headers": "sh ./check-headers.sh",
Expand Down
4 changes: 3 additions & 1 deletion src/interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,14 @@ export const extractParameters = ixType => {
* @returns {Promise<any>}
*/
export const sendTransaction = async (...props) => {
// This is here to fix an issue with microbundler confusing argument scopes
let _props = props
let result = null,
err = null
const logs = await captureLogs(async () => {
try {
const extractor = extractParameters("tx")
const {code, args, signers, limit} = await extractor(props)
const {code, args, signers, limit} = await extractor(_props)

const serviceAuth = authorization()

Expand Down