From 435d73346fef492564aaa9482992cc360f2f4129 Mon Sep 17 00:00:00 2001 From: Jordan Ribbink Date: Tue, 21 May 2024 14:45:38 -0700 Subject: [PATCH 1/7] Decode Transaction ID --- packages/flow-cadut/src/interactions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flow-cadut/src/interactions.js b/packages/flow-cadut/src/interactions.js index a06ad01..aeccdb6 100644 --- a/packages/flow-cadut/src/interactions.js +++ b/packages/flow-cadut/src/interactions.js @@ -113,7 +113,7 @@ export const waitForStatus = statusValue => { export const sendTransaction = async props => { const {wait = "seal"} = props try { - const response = await prepareInteraction(props, "transaction") + const response = await fcl.decode(await prepareInteraction(props, "transaction")) if (wait) { const waitMethod = waitForStatus(wait) const rawResult = await fcl.tx(response)[waitMethod]() From 8c0069a300c1718dd12b96b82137f7f143944989 Mon Sep 17 00:00:00 2001 From: Jordan Ribbink Date: Tue, 21 May 2024 14:46:48 -0700 Subject: [PATCH 2/7] fix txid return --- packages/flow-cadut/src/interactions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/flow-cadut/src/interactions.js b/packages/flow-cadut/src/interactions.js index aeccdb6..5677c16 100644 --- a/packages/flow-cadut/src/interactions.js +++ b/packages/flow-cadut/src/interactions.js @@ -113,17 +113,17 @@ export const waitForStatus = statusValue => { export const sendTransaction = async props => { const {wait = "seal"} = props try { - const response = await fcl.decode(await prepareInteraction(props, "transaction")) + const txId = await fcl.decode(await prepareInteraction(props, "transaction")) if (wait) { const waitMethod = waitForStatus(wait) const rawResult = await fcl.tx(response)[waitMethod]() const txResult = { - txId: response, + txId, ...rawResult, } return [txResult, null] } - return [response.transactionId, null] + return [txId, null] } catch (e) { return [null, e] } From fb71ecfb14d2c08c9608b400b019caaa2f79193d Mon Sep 17 00:00:00 2001 From: Jordan Ribbink Date: Tue, 21 May 2024 22:35:37 -0700 Subject: [PATCH 3/7] Update @onflow/config --- package-lock.json | 256 +++++-------------------------- packages/dev-test/package.json | 2 +- packages/flow-cadut/package.json | 2 +- 3 files changed, 42 insertions(+), 218 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5b6420c..0c4dd77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5786,10 +5786,16 @@ } }, "node_modules/@onflow/config": { - "version": "0.0.2", - "license": "Apache-2.0", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@onflow/config/-/config-1.4.0.tgz", + "integrity": "sha512-W29y7ud0dT6BCqU9uN/remW3mjbh38YSPmkYFRZp1peCXjLLxw/ls4VLT6+gFLWpRXrJrLR3aohbWsZOuUb7hA==", "dependencies": { - "@onflow/util-actor": "0.0.2" + "@babel/runtime": "^7.18.6", + "@onflow/util-actor": "1.3.2", + "@onflow/util-invariant": "1.2.3", + "@onflow/util-logger": "1.3.2", + "eslint": "^8.34.0", + "eslint-plugin-jsdoc": "^46.9.0" } }, "node_modules/@onflow/fcl": { @@ -5863,50 +5869,6 @@ "cross-fetch": "^3.1.6" } }, - "node_modules/@onflow/fcl-core/node_modules/@onflow/config": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@onflow/config/-/config-1.4.0.tgz", - "integrity": "sha512-W29y7ud0dT6BCqU9uN/remW3mjbh38YSPmkYFRZp1peCXjLLxw/ls4VLT6+gFLWpRXrJrLR3aohbWsZOuUb7hA==", - "dependencies": { - "@babel/runtime": "^7.18.6", - "@onflow/util-actor": "1.3.2", - "@onflow/util-invariant": "1.2.3", - "@onflow/util-logger": "1.3.2", - "eslint": "^8.34.0", - "eslint-plugin-jsdoc": "^46.9.0" - } - }, - "node_modules/@onflow/fcl-core/node_modules/@onflow/util-actor": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@onflow/util-actor/-/util-actor-1.3.2.tgz", - "integrity": "sha512-XaqFJW+8HbM8Fbl4YjTIS1WSX/h3Vo9E+yFvKEnA6+SxjLmqEfM8f9h0XSGIiOE0ChqZSYWDzQCpxdZNpi1nrA==", - "dependencies": { - "@babel/runtime": "^7.18.6", - "queue-microtask": "1.2.3" - } - }, - "node_modules/@onflow/fcl/node_modules/@onflow/config": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@onflow/config/-/config-1.4.0.tgz", - "integrity": "sha512-W29y7ud0dT6BCqU9uN/remW3mjbh38YSPmkYFRZp1peCXjLLxw/ls4VLT6+gFLWpRXrJrLR3aohbWsZOuUb7hA==", - "dependencies": { - "@babel/runtime": "^7.18.6", - "@onflow/util-actor": "1.3.2", - "@onflow/util-invariant": "1.2.3", - "@onflow/util-logger": "1.3.2", - "eslint": "^8.34.0", - "eslint-plugin-jsdoc": "^46.9.0" - } - }, - "node_modules/@onflow/fcl/node_modules/@onflow/util-actor": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@onflow/util-actor/-/util-actor-1.3.2.tgz", - "integrity": "sha512-XaqFJW+8HbM8Fbl4YjTIS1WSX/h3Vo9E+yFvKEnA6+SxjLmqEfM8f9h0XSGIiOE0ChqZSYWDzQCpxdZNpi1nrA==", - "dependencies": { - "@babel/runtime": "^7.18.6", - "queue-microtask": "1.2.3" - } - }, "node_modules/@onflow/flow-cadut": { "resolved": "packages/flow-cadut", "link": true @@ -5928,14 +5890,14 @@ "link": true }, "node_modules/@onflow/flow-js-testing": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@onflow/flow-js-testing/-/flow-js-testing-0.4.0.tgz", - "integrity": "sha512-YgmgKCXTN1iWlr2kB83kfEmd9RIXryD2YHW/RnE0CKLmU0eQJJhYjUZ9U3c0hmkXzsRGRruMkDYyO3PSeMrc9w==", + "version": "0.6.0-stable-cadence.2", + "resolved": "https://registry.npmjs.org/@onflow/flow-js-testing/-/flow-js-testing-0.6.0-stable-cadence.2.tgz", + "integrity": "sha512-zWHuTsqP+oV4BDmvCAKIVjOaaq3MdZDwcAPHXGVP0iSz2b2Si2mT5+RVRZlfwOpVJeYAfR2/H020gcTvufQr7A==", "dev": true, "dependencies": { "@onflow/fcl": "^1.3.2", "@onflow/fcl-config": "^0.0.1", - "@onflow/flow-cadut": "0.2.0-alpha.9", + "@onflow/flow-cadut": "^0.3.0-stable-cadence.0", "@onflow/types": "^1.0.5", "elliptic": "^6.5.4", "esm": "^3.2.25", @@ -5950,31 +5912,6 @@ "flow-js-testing": "bin/index.js" } }, - "node_modules/@onflow/flow-js-testing/node_modules/@onflow/flow-cadut": { - "version": "0.2.0-alpha.9", - "resolved": "https://registry.npmjs.org/@onflow/flow-cadut/-/flow-cadut-0.2.0-alpha.9.tgz", - "integrity": "sha512-eFKt/0inM7hyWLMnCyNojQ/oaueij5HEP9xJNlnoa3q3+qJCCb2Wr8FQxebGtrGM4z3IaAb9ah7X13q0TeBRgg==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.18.6", - "@onflow/config": "0.0.2", - "@onflow/fcl": "^1.3.0-alpha.3", - "elliptic": "^6.5.4", - "esm": "^3.2.25", - "rimraf": "^3.0.2", - "rlp": "^3.0.0", - "sha3": "^2.1.4" - } - }, - "node_modules/@onflow/flow-js-testing/node_modules/@onflow/flow-cadut/node_modules/rlp": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-3.0.0.tgz", - "integrity": "sha512-PD6U2PGk6Vq2spfgiWZdomLvRGDreBLxi5jv5M8EpRo3pU6VEm31KO+HFxE18Q3vgqfDrQ9pZA3FP95rkijNKw==", - "dev": true, - "bin": { - "rlp": "bin/rlp" - } - }, "node_modules/@onflow/flow-js-testing/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -6127,28 +6064,6 @@ "uuid": "^9.0.1" } }, - "node_modules/@onflow/sdk/node_modules/@onflow/config": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@onflow/config/-/config-1.4.0.tgz", - "integrity": "sha512-W29y7ud0dT6BCqU9uN/remW3mjbh38YSPmkYFRZp1peCXjLLxw/ls4VLT6+gFLWpRXrJrLR3aohbWsZOuUb7hA==", - "dependencies": { - "@babel/runtime": "^7.18.6", - "@onflow/util-actor": "1.3.2", - "@onflow/util-invariant": "1.2.3", - "@onflow/util-logger": "1.3.2", - "eslint": "^8.34.0", - "eslint-plugin-jsdoc": "^46.9.0" - } - }, - "node_modules/@onflow/sdk/node_modules/@onflow/util-actor": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@onflow/util-actor/-/util-actor-1.3.2.tgz", - "integrity": "sha512-XaqFJW+8HbM8Fbl4YjTIS1WSX/h3Vo9E+yFvKEnA6+SxjLmqEfM8f9h0XSGIiOE0ChqZSYWDzQCpxdZNpi1nrA==", - "dependencies": { - "@babel/runtime": "^7.18.6", - "queue-microtask": "1.2.3" - } - }, "node_modules/@onflow/sdk/node_modules/uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", @@ -6216,16 +6131,14 @@ } }, "node_modules/@onflow/util-actor": { - "version": "0.0.2", - "license": "Apache-2.0", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@onflow/util-actor/-/util-actor-1.3.2.tgz", + "integrity": "sha512-XaqFJW+8HbM8Fbl4YjTIS1WSX/h3Vo9E+yFvKEnA6+SxjLmqEfM8f9h0XSGIiOE0ChqZSYWDzQCpxdZNpi1nrA==", "dependencies": { - "queue-microtask": "1.1.2" + "@babel/runtime": "^7.18.6", + "queue-microtask": "1.2.3" } }, - "node_modules/@onflow/util-actor/node_modules/queue-microtask": { - "version": "1.1.2", - "license": "MIT" - }, "node_modules/@onflow/util-address": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@onflow/util-address/-/util-address-1.2.2.tgz", @@ -20960,7 +20873,7 @@ "devDependencies": { "@babel/core": "^7.15.5", "@babel/preset-env": "^7.15.6", - "@onflow/flow-js-testing": "^0.4.0", + "@onflow/flow-js-testing": "^0.6.0-stable-cadence.2", "babel-jest": "^27.2.0", "elliptic": "^6.5.4", "jest": "^27.2.0", @@ -22078,7 +21991,7 @@ "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.18.6", - "@onflow/config": "0.0.2", + "@onflow/config": "^1.4.0", "@onflow/fcl": "^1.10.1", "elliptic": "^6.5.4", "esm": "^3.2.25", @@ -27239,9 +27152,16 @@ } }, "@onflow/config": { - "version": "0.0.2", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@onflow/config/-/config-1.4.0.tgz", + "integrity": "sha512-W29y7ud0dT6BCqU9uN/remW3mjbh38YSPmkYFRZp1peCXjLLxw/ls4VLT6+gFLWpRXrJrLR3aohbWsZOuUb7hA==", "requires": { - "@onflow/util-actor": "0.0.2" + "@babel/runtime": "^7.18.6", + "@onflow/util-actor": "1.3.2", + "@onflow/util-invariant": "1.2.3", + "@onflow/util-logger": "1.3.2", + "eslint": "^8.34.0", + "eslint-plugin-jsdoc": "^46.9.0" } }, "@onflow/fcl": { @@ -27266,30 +27186,6 @@ "cross-fetch": "^3.1.6", "events": "^3.3.0", "sha3": "^2.1.4" - }, - "dependencies": { - "@onflow/config": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@onflow/config/-/config-1.4.0.tgz", - "integrity": "sha512-W29y7ud0dT6BCqU9uN/remW3mjbh38YSPmkYFRZp1peCXjLLxw/ls4VLT6+gFLWpRXrJrLR3aohbWsZOuUb7hA==", - "requires": { - "@babel/runtime": "^7.18.6", - "@onflow/util-actor": "1.3.2", - "@onflow/util-invariant": "1.2.3", - "@onflow/util-logger": "1.3.2", - "eslint": "^8.34.0", - "eslint-plugin-jsdoc": "^46.9.0" - } - }, - "@onflow/util-actor": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@onflow/util-actor/-/util-actor-1.3.2.tgz", - "integrity": "sha512-XaqFJW+8HbM8Fbl4YjTIS1WSX/h3Vo9E+yFvKEnA6+SxjLmqEfM8f9h0XSGIiOE0ChqZSYWDzQCpxdZNpi1nrA==", - "requires": { - "@babel/runtime": "^7.18.6", - "queue-microtask": "1.2.3" - } - } } }, "@onflow/fcl-bundle": { @@ -27332,30 +27228,6 @@ "@onflow/util-template": "1.2.2", "@onflow/util-uid": "1.2.2", "cross-fetch": "^3.1.6" - }, - "dependencies": { - "@onflow/config": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@onflow/config/-/config-1.4.0.tgz", - "integrity": "sha512-W29y7ud0dT6BCqU9uN/remW3mjbh38YSPmkYFRZp1peCXjLLxw/ls4VLT6+gFLWpRXrJrLR3aohbWsZOuUb7hA==", - "requires": { - "@babel/runtime": "^7.18.6", - "@onflow/util-actor": "1.3.2", - "@onflow/util-invariant": "1.2.3", - "@onflow/util-logger": "1.3.2", - "eslint": "^8.34.0", - "eslint-plugin-jsdoc": "^46.9.0" - } - }, - "@onflow/util-actor": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@onflow/util-actor/-/util-actor-1.3.2.tgz", - "integrity": "sha512-XaqFJW+8HbM8Fbl4YjTIS1WSX/h3Vo9E+yFvKEnA6+SxjLmqEfM8f9h0XSGIiOE0ChqZSYWDzQCpxdZNpi1nrA==", - "requires": { - "@babel/runtime": "^7.18.6", - "queue-microtask": "1.2.3" - } - } } }, "@onflow/flow-cadut": { @@ -27365,7 +27237,7 @@ "@babel/runtime": "^7.18.6", "@changesets/changelog-github": "^0.4.5", "@changesets/cli": "^2.23.0", - "@onflow/config": "0.0.2", + "@onflow/config": "^1.4.0", "@onflow/fcl": "^1.10.1", "@onflow/fcl-bundle": "^1.1.0", "babel-jest": "^26.6.3", @@ -28229,14 +28101,14 @@ } }, "@onflow/flow-js-testing": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@onflow/flow-js-testing/-/flow-js-testing-0.4.0.tgz", - "integrity": "sha512-YgmgKCXTN1iWlr2kB83kfEmd9RIXryD2YHW/RnE0CKLmU0eQJJhYjUZ9U3c0hmkXzsRGRruMkDYyO3PSeMrc9w==", + "version": "0.6.0-stable-cadence.2", + "resolved": "https://registry.npmjs.org/@onflow/flow-js-testing/-/flow-js-testing-0.6.0-stable-cadence.2.tgz", + "integrity": "sha512-zWHuTsqP+oV4BDmvCAKIVjOaaq3MdZDwcAPHXGVP0iSz2b2Si2mT5+RVRZlfwOpVJeYAfR2/H020gcTvufQr7A==", "dev": true, "requires": { "@onflow/fcl": "^1.3.2", "@onflow/fcl-config": "^0.0.1", - "@onflow/flow-cadut": "0.2.0-alpha.9", + "@onflow/flow-cadut": "^0.3.0-stable-cadence.0", "@onflow/types": "^1.0.5", "elliptic": "^6.5.4", "esm": "^3.2.25", @@ -28248,30 +28120,6 @@ "yargs": "^17.0.1" }, "dependencies": { - "@onflow/flow-cadut": { - "version": "0.2.0-alpha.9", - "resolved": "https://registry.npmjs.org/@onflow/flow-cadut/-/flow-cadut-0.2.0-alpha.9.tgz", - "integrity": "sha512-eFKt/0inM7hyWLMnCyNojQ/oaueij5HEP9xJNlnoa3q3+qJCCb2Wr8FQxebGtrGM4z3IaAb9ah7X13q0TeBRgg==", - "dev": true, - "requires": { - "@babel/runtime": "^7.18.6", - "@onflow/config": "0.0.2", - "@onflow/fcl": "^1.3.0-alpha.3", - "elliptic": "^6.5.4", - "esm": "^3.2.25", - "rimraf": "^3.0.2", - "rlp": "^3.0.0", - "sha3": "^2.1.4" - }, - "dependencies": { - "rlp": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-3.0.0.tgz", - "integrity": "sha512-PD6U2PGk6Vq2spfgiWZdomLvRGDreBLxi5jv5M8EpRo3pU6VEm31KO+HFxE18Q3vgqfDrQ9pZA3FP95rkijNKw==", - "dev": true - } - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -28395,28 +28243,6 @@ "uuid": "^9.0.1" }, "dependencies": { - "@onflow/config": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@onflow/config/-/config-1.4.0.tgz", - "integrity": "sha512-W29y7ud0dT6BCqU9uN/remW3mjbh38YSPmkYFRZp1peCXjLLxw/ls4VLT6+gFLWpRXrJrLR3aohbWsZOuUb7hA==", - "requires": { - "@babel/runtime": "^7.18.6", - "@onflow/util-actor": "1.3.2", - "@onflow/util-invariant": "1.2.3", - "@onflow/util-logger": "1.3.2", - "eslint": "^8.34.0", - "eslint-plugin-jsdoc": "^46.9.0" - } - }, - "@onflow/util-actor": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@onflow/util-actor/-/util-actor-1.3.2.tgz", - "integrity": "sha512-XaqFJW+8HbM8Fbl4YjTIS1WSX/h3Vo9E+yFvKEnA6+SxjLmqEfM8f9h0XSGIiOE0ChqZSYWDzQCpxdZNpi1nrA==", - "requires": { - "@babel/runtime": "^7.18.6", - "queue-microtask": "1.2.3" - } - }, "uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", @@ -28467,14 +28293,12 @@ } }, "@onflow/util-actor": { - "version": "0.0.2", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@onflow/util-actor/-/util-actor-1.3.2.tgz", + "integrity": "sha512-XaqFJW+8HbM8Fbl4YjTIS1WSX/h3Vo9E+yFvKEnA6+SxjLmqEfM8f9h0XSGIiOE0ChqZSYWDzQCpxdZNpi1nrA==", "requires": { - "queue-microtask": "1.1.2" - }, - "dependencies": { - "queue-microtask": { - "version": "1.1.2" - } + "@babel/runtime": "^7.18.6", + "queue-microtask": "1.2.3" } }, "@onflow/util-address": { @@ -30300,7 +30124,7 @@ "@babel/core": "^7.15.5", "@babel/preset-env": "^7.15.6", "@onflow/fcl": "^1.10.1", - "@onflow/flow-js-testing": "^0.4.0", + "@onflow/flow-js-testing": "^0.6.0-stable-cadence.2", "babel-jest": "^27.2.0", "elliptic": "^6.5.4", "jest": "^27.2.0", diff --git a/packages/dev-test/package.json b/packages/dev-test/package.json index 70ae76c..41347e5 100644 --- a/packages/dev-test/package.json +++ b/packages/dev-test/package.json @@ -13,7 +13,7 @@ "devDependencies": { "@babel/core": "^7.15.5", "@babel/preset-env": "^7.15.6", - "@onflow/flow-js-testing": "^0.4.0", + "@onflow/flow-js-testing": "^0.6.0-stable-cadence.2", "babel-jest": "^27.2.0", "elliptic": "^6.5.4", "jest": "^27.2.0", diff --git a/packages/flow-cadut/package.json b/packages/flow-cadut/package.json index ac3f595..b48e519 100644 --- a/packages/flow-cadut/package.json +++ b/packages/flow-cadut/package.json @@ -31,7 +31,7 @@ }, "dependencies": { "@babel/runtime": "^7.18.6", - "@onflow/config": "0.0.2", + "@onflow/config": "^1.4.0", "@onflow/fcl": "^1.10.1", "elliptic": "^6.5.4", "esm": "^3.2.25", From 11dcadc46b206cd2d104eb13bc7bc254bf67f115 Mon Sep 17 00:00:00 2001 From: Jordan Ribbink Date: Tue, 21 May 2024 22:39:58 -0700 Subject: [PATCH 4/7] fixup --- .changeset/config.json | 4 ++-- .changeset/forty-lobsters-smell.md | 5 +++++ .vscode/settings.json | 2 +- packages/flow-cadut/src/interactions.js | 4 +++- 4 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 .changeset/forty-lobsters-smell.md diff --git a/.changeset/config.json b/.changeset/config.json index 6708874..9a3fa89 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,11 +1,11 @@ { "$schema": "https://unpkg.com/@changesets/config@2.0.0/schema.json", - "changelog": ["@changesets/changelog-github", { "repo": "onflow/flow-cadut" }], + "changelog": ["@changesets/changelog-github", {"repo": "onflow/flow-cadut"}], "commit": false, "fixed": [], "linked": [], "access": "public", - "baseBranch": "master", + "baseBranch": "feature/stable-cadence", "updateInternalDependencies": "patch", "ignore": [ "dev-test", diff --git a/.changeset/forty-lobsters-smell.md b/.changeset/forty-lobsters-smell.md new file mode 100644 index 0000000..2e851c5 --- /dev/null +++ b/.changeset/forty-lobsters-smell.md @@ -0,0 +1,5 @@ +--- +"@onflow/flow-cadut": patch +--- + +Update @onflow/fcl diff --git a/.vscode/settings.json b/.vscode/settings.json index 4a230a0..495f438 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { "editor.formatOnSave": true, - "editor.defaultFormatter": "dbaeumer.vscode-eslint", + "editor.defaultFormatter": "esbenp.prettier-vscode", "eslint.format.enable": true } \ No newline at end of file diff --git a/packages/flow-cadut/src/interactions.js b/packages/flow-cadut/src/interactions.js index 5677c16..05f4704 100644 --- a/packages/flow-cadut/src/interactions.js +++ b/packages/flow-cadut/src/interactions.js @@ -113,7 +113,9 @@ export const waitForStatus = statusValue => { export const sendTransaction = async props => { const {wait = "seal"} = props try { - const txId = await fcl.decode(await prepareInteraction(props, "transaction")) + const txId = await fcl.decode( + await prepareInteraction(props, "transaction") + ) if (wait) { const waitMethod = waitForStatus(wait) const rawResult = await fcl.tx(response)[waitMethod]() From 947c7f4634d299f37c590291d3224f4e1371ccdd Mon Sep 17 00:00:00 2001 From: Jordan Ribbink Date: Tue, 21 May 2024 22:47:08 -0700 Subject: [PATCH 5/7] fix CI --- package-lock.json | 486 ++++++++++----------- packages/dev-test/package.json | 2 +- packages/dev-test/test/interaction.test.js | 3 +- packages/flow-cadut/src/interactions.js | 2 +- 4 files changed, 237 insertions(+), 256 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0c4dd77..3895beb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5889,147 +5889,6 @@ "resolved": "packages/flow-cadut-views", "link": true }, - "node_modules/@onflow/flow-js-testing": { - "version": "0.6.0-stable-cadence.2", - "resolved": "https://registry.npmjs.org/@onflow/flow-js-testing/-/flow-js-testing-0.6.0-stable-cadence.2.tgz", - "integrity": "sha512-zWHuTsqP+oV4BDmvCAKIVjOaaq3MdZDwcAPHXGVP0iSz2b2Si2mT5+RVRZlfwOpVJeYAfR2/H020gcTvufQr7A==", - "dev": true, - "dependencies": { - "@onflow/fcl": "^1.3.2", - "@onflow/fcl-config": "^0.0.1", - "@onflow/flow-cadut": "^0.3.0-stable-cadence.0", - "@onflow/types": "^1.0.5", - "elliptic": "^6.5.4", - "esm": "^3.2.25", - "jest-environment-uint8array": "^1.0.0", - "js-sha256": "^0.9.0", - "js-sha3": "^0.8.0", - "rimraf": "^3.0.2", - "rlp": "^2.2.6", - "yargs": "^17.0.1" - }, - "bin": { - "flow-js-testing": "bin/index.js" - } - }, - "node_modules/@onflow/flow-js-testing/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@onflow/flow-js-testing/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "node_modules/@onflow/flow-js-testing/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@onflow/flow-js-testing/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@onflow/flow-js-testing/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/@onflow/flow-js-testing/node_modules/rlp": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", - "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.0" - }, - "bin": { - "rlp": "bin/rlp" - } - }, - "node_modules/@onflow/flow-js-testing/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@onflow/flow-js-testing/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@onflow/flow-js-testing/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@onflow/flow-js-testing/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/@onflow/interaction": { "version": "0.0.11", "license": "Apache-2.0" @@ -20873,7 +20732,7 @@ "devDependencies": { "@babel/core": "^7.15.5", "@babel/preset-env": "^7.15.6", - "@onflow/flow-js-testing": "^0.6.0-stable-cadence.2", + "@onflow/flow-js-testing": "^0.4.0", "babel-jest": "^27.2.0", "elliptic": "^6.5.4", "jest": "^27.2.0", @@ -21109,6 +20968,116 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "packages/dev-test/node_modules/@onflow/config": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@onflow/config/-/config-0.0.2.tgz", + "integrity": "sha512-H/+yrAalzEnMWkubiWsDdWytKSzd+OfRCddTlaRUelxfXhcfw2QWegH9N8EzeKfKXcQ6PLzvu9vQwhFxCZTE8Q==", + "dev": true, + "dependencies": { + "@onflow/util-actor": "0.0.2" + } + }, + "packages/dev-test/node_modules/@onflow/flow-cadut": { + "version": "0.2.0-alpha.9", + "resolved": "https://registry.npmjs.org/@onflow/flow-cadut/-/flow-cadut-0.2.0-alpha.9.tgz", + "integrity": "sha512-eFKt/0inM7hyWLMnCyNojQ/oaueij5HEP9xJNlnoa3q3+qJCCb2Wr8FQxebGtrGM4z3IaAb9ah7X13q0TeBRgg==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.18.6", + "@onflow/config": "0.0.2", + "@onflow/fcl": "^1.3.0-alpha.3", + "elliptic": "^6.5.4", + "esm": "^3.2.25", + "rimraf": "^3.0.2", + "rlp": "^3.0.0", + "sha3": "^2.1.4" + } + }, + "packages/dev-test/node_modules/@onflow/flow-js-testing": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@onflow/flow-js-testing/-/flow-js-testing-0.4.0.tgz", + "integrity": "sha512-YgmgKCXTN1iWlr2kB83kfEmd9RIXryD2YHW/RnE0CKLmU0eQJJhYjUZ9U3c0hmkXzsRGRruMkDYyO3PSeMrc9w==", + "dev": true, + "dependencies": { + "@onflow/fcl": "^1.3.2", + "@onflow/fcl-config": "^0.0.1", + "@onflow/flow-cadut": "0.2.0-alpha.9", + "@onflow/types": "^1.0.5", + "elliptic": "^6.5.4", + "esm": "^3.2.25", + "jest-environment-uint8array": "^1.0.0", + "js-sha256": "^0.9.0", + "js-sha3": "^0.8.0", + "rimraf": "^3.0.2", + "rlp": "^2.2.6", + "yargs": "^17.0.1" + }, + "bin": { + "flow-js-testing": "bin/index.js" + } + }, + "packages/dev-test/node_modules/@onflow/flow-js-testing/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "packages/dev-test/node_modules/@onflow/flow-js-testing/node_modules/rlp": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", + "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", + "dev": true, + "dependencies": { + "bn.js": "^5.2.0" + }, + "bin": { + "rlp": "bin/rlp" + } + }, + "packages/dev-test/node_modules/@onflow/flow-js-testing/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "packages/dev-test/node_modules/@onflow/flow-js-testing/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "packages/dev-test/node_modules/@onflow/util-actor": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@onflow/util-actor/-/util-actor-0.0.2.tgz", + "integrity": "sha512-NV3zPXQue3FqVgcIIMo6ifJOiP3hVSQTaR4ZrWLFU5iAZ/L73cTtBMbCB4BUFOe20ALtF2c9PFmpNVowCYV+nw==", + "dev": true, + "dependencies": { + "queue-microtask": "1.1.2" + } + }, "packages/dev-test/node_modules/@sinonjs/fake-timers": { "version": "8.1.0", "dev": true, @@ -21189,6 +21158,12 @@ "@babel/core": "^7.0.0" } }, + "packages/dev-test/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, "packages/dev-test/node_modules/chalk": { "version": "4.1.2", "dev": true, @@ -21861,6 +21836,12 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "packages/dev-test/node_modules/queue-microtask": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.1.2.tgz", + "integrity": "sha512-F9wwNePtXrzZenAB3ax0Y8TSKGvuB7Qw16J30hspEUTbfUM+H827XyN3rlpwhVmtm5wuZtbKIHjOnwDn7MUxWQ==", + "dev": true + }, "packages/dev-test/node_modules/react-is": { "version": "17.0.2", "dev": true, @@ -28100,116 +28081,6 @@ "jest": "^28.1.3" } }, - "@onflow/flow-js-testing": { - "version": "0.6.0-stable-cadence.2", - "resolved": "https://registry.npmjs.org/@onflow/flow-js-testing/-/flow-js-testing-0.6.0-stable-cadence.2.tgz", - "integrity": "sha512-zWHuTsqP+oV4BDmvCAKIVjOaaq3MdZDwcAPHXGVP0iSz2b2Si2mT5+RVRZlfwOpVJeYAfR2/H020gcTvufQr7A==", - "dev": true, - "requires": { - "@onflow/fcl": "^1.3.2", - "@onflow/fcl-config": "^0.0.1", - "@onflow/flow-cadut": "^0.3.0-stable-cadence.0", - "@onflow/types": "^1.0.5", - "elliptic": "^6.5.4", - "esm": "^3.2.25", - "jest-environment-uint8array": "^1.0.0", - "js-sha256": "^0.9.0", - "js-sha3": "^0.8.0", - "rimraf": "^3.0.2", - "rlp": "^2.2.6", - "yargs": "^17.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "rlp": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", - "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", - "dev": true, - "requires": { - "bn.js": "^5.2.0" - } - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true - } - } - }, "@onflow/interaction": { "version": "0.0.11" }, @@ -30124,7 +29995,7 @@ "@babel/core": "^7.15.5", "@babel/preset-env": "^7.15.6", "@onflow/fcl": "^1.10.1", - "@onflow/flow-js-testing": "^0.6.0-stable-cadence.2", + "@onflow/flow-js-testing": "^0.4.0", "babel-jest": "^27.2.0", "elliptic": "^6.5.4", "jest": "^27.2.0", @@ -30301,6 +30172,103 @@ "chalk": "^4.0.0" } }, + "@onflow/config": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@onflow/config/-/config-0.0.2.tgz", + "integrity": "sha512-H/+yrAalzEnMWkubiWsDdWytKSzd+OfRCddTlaRUelxfXhcfw2QWegH9N8EzeKfKXcQ6PLzvu9vQwhFxCZTE8Q==", + "dev": true, + "requires": { + "@onflow/util-actor": "0.0.2" + } + }, + "@onflow/flow-cadut": { + "version": "0.2.0-alpha.9", + "resolved": "https://registry.npmjs.org/@onflow/flow-cadut/-/flow-cadut-0.2.0-alpha.9.tgz", + "integrity": "sha512-eFKt/0inM7hyWLMnCyNojQ/oaueij5HEP9xJNlnoa3q3+qJCCb2Wr8FQxebGtrGM4z3IaAb9ah7X13q0TeBRgg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.18.6", + "@onflow/config": "0.0.2", + "@onflow/fcl": "^1.3.0-alpha.3", + "elliptic": "^6.5.4", + "esm": "^3.2.25", + "rimraf": "^3.0.2", + "rlp": "^3.0.0", + "sha3": "^2.1.4" + } + }, + "@onflow/flow-js-testing": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@onflow/flow-js-testing/-/flow-js-testing-0.4.0.tgz", + "integrity": "sha512-YgmgKCXTN1iWlr2kB83kfEmd9RIXryD2YHW/RnE0CKLmU0eQJJhYjUZ9U3c0hmkXzsRGRruMkDYyO3PSeMrc9w==", + "dev": true, + "requires": { + "@onflow/fcl": "^1.3.2", + "@onflow/fcl-config": "^0.0.1", + "@onflow/flow-cadut": "0.2.0-alpha.9", + "@onflow/types": "^1.0.5", + "elliptic": "^6.5.4", + "esm": "^3.2.25", + "jest-environment-uint8array": "^1.0.0", + "js-sha256": "^0.9.0", + "js-sha3": "^0.8.0", + "rimraf": "^3.0.2", + "rlp": "^2.2.6", + "yargs": "^17.0.1" + }, + "dependencies": { + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "rlp": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", + "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", + "dev": true, + "requires": { + "bn.js": "^5.2.0" + } + }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + } + } + }, + "@onflow/util-actor": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@onflow/util-actor/-/util-actor-0.0.2.tgz", + "integrity": "sha512-NV3zPXQue3FqVgcIIMo6ifJOiP3hVSQTaR4ZrWLFU5iAZ/L73cTtBMbCB4BUFOe20ALtF2c9PFmpNVowCYV+nw==", + "dev": true, + "requires": { + "queue-microtask": "1.1.2" + } + }, "@sinonjs/fake-timers": { "version": "8.1.0", "dev": true, @@ -30354,6 +30322,12 @@ "babel-preset-current-node-syntax": "^1.0.0" } }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, "chalk": { "version": "4.1.2", "dev": true, @@ -30832,6 +30806,12 @@ } } }, + "queue-microtask": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.1.2.tgz", + "integrity": "sha512-F9wwNePtXrzZenAB3ax0Y8TSKGvuB7Qw16J30hspEUTbfUM+H827XyN3rlpwhVmtm5wuZtbKIHjOnwDn7MUxWQ==", + "dev": true + }, "react-is": { "version": "17.0.2", "dev": true diff --git a/packages/dev-test/package.json b/packages/dev-test/package.json index 41347e5..70ae76c 100644 --- a/packages/dev-test/package.json +++ b/packages/dev-test/package.json @@ -13,7 +13,7 @@ "devDependencies": { "@babel/core": "^7.15.5", "@babel/preset-env": "^7.15.6", - "@onflow/flow-js-testing": "^0.6.0-stable-cadence.2", + "@onflow/flow-js-testing": "^0.4.0", "babel-jest": "^27.2.0", "elliptic": "^6.5.4", "jest": "^27.2.0", diff --git a/packages/dev-test/test/interaction.test.js b/packages/dev-test/test/interaction.test.js index 7caca9f..27e1924 100644 --- a/packages/dev-test/test/interaction.test.js +++ b/packages/dev-test/test/interaction.test.js @@ -32,7 +32,8 @@ describe("arguments - scripts", () => { } ` - const [result] = await query({cadence, raw: true}) + const [result, err] = await query({cadence, raw: true}) + expect(err).toBe(null) expect(result.type).toBe("Struct") expect(result.value.id.includes("Info")).toBe(true) diff --git a/packages/flow-cadut/src/interactions.js b/packages/flow-cadut/src/interactions.js index 05f4704..62359a7 100644 --- a/packages/flow-cadut/src/interactions.js +++ b/packages/flow-cadut/src/interactions.js @@ -118,7 +118,7 @@ export const sendTransaction = async props => { ) if (wait) { const waitMethod = waitForStatus(wait) - const rawResult = await fcl.tx(response)[waitMethod]() + const rawResult = await fcl.tx(txId)[waitMethod]() const txResult = { txId, ...rawResult, From 997b73e839b12c19e72437d30acd8146a6812591 Mon Sep 17 00:00:00 2001 From: Jordan Ribbink Date: Tue, 21 May 2024 22:54:19 -0700 Subject: [PATCH 6/7] sendtx revert --- packages/flow-cadut/src/interactions.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/flow-cadut/src/interactions.js b/packages/flow-cadut/src/interactions.js index 62359a7..a06ad01 100644 --- a/packages/flow-cadut/src/interactions.js +++ b/packages/flow-cadut/src/interactions.js @@ -113,19 +113,17 @@ export const waitForStatus = statusValue => { export const sendTransaction = async props => { const {wait = "seal"} = props try { - const txId = await fcl.decode( - await prepareInteraction(props, "transaction") - ) + const response = await prepareInteraction(props, "transaction") if (wait) { const waitMethod = waitForStatus(wait) - const rawResult = await fcl.tx(txId)[waitMethod]() + const rawResult = await fcl.tx(response)[waitMethod]() const txResult = { - txId, + txId: response, ...rawResult, } return [txResult, null] } - return [txId, null] + return [response.transactionId, null] } catch (e) { return [null, e] } From 5fa063e067de0fa5f6347301698a0c129eb74e09 Mon Sep 17 00:00:00 2001 From: Jordan Ribbink Date: Tue, 21 May 2024 22:54:50 -0700 Subject: [PATCH 7/7] revert --- packages/dev-test/test/interaction.test.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/dev-test/test/interaction.test.js b/packages/dev-test/test/interaction.test.js index 27e1924..7caca9f 100644 --- a/packages/dev-test/test/interaction.test.js +++ b/packages/dev-test/test/interaction.test.js @@ -32,8 +32,7 @@ describe("arguments - scripts", () => { } ` - const [result, err] = await query({cadence, raw: true}) - expect(err).toBe(null) + const [result] = await query({cadence, raw: true}) expect(result.type).toBe("Struct") expect(result.value.id.includes("Info")).toBe(true)