diff --git a/.changeset/proud-planes-change.md b/.changeset/proud-planes-change.md new file mode 100644 index 000000000..791e5ba90 --- /dev/null +++ b/.changeset/proud-planes-change.md @@ -0,0 +1,5 @@ +--- +"@onflow/fcl-core": patch +--- + +Fix bug affecting `fcl.tx(...).onceSealed()` diff --git a/package-lock.json b/package-lock.json index 1246770a1..2005eb331 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29050,16 +29050,16 @@ }, "packages/fcl": { "name": "@onflow/fcl", - "version": "1.13.0", + "version": "1.13.2", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.25.7", "@onflow/config": "1.5.1", - "@onflow/fcl-core": "1.13.0", - "@onflow/fcl-wc": "5.5.0", + "@onflow/fcl-core": "1.13.2", + "@onflow/fcl-wc": "5.5.2", "@onflow/interaction": "0.0.11", "@onflow/rlp": "1.2.3", - "@onflow/sdk": "1.5.4", + "@onflow/sdk": "1.5.5", "@onflow/types": "1.4.1", "@onflow/util-actor": "1.3.4", "@onflow/util-address": "1.2.3", @@ -29124,7 +29124,7 @@ }, "packages/fcl-core": { "name": "@onflow/fcl-core", - "version": "1.13.0", + "version": "1.13.2", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.25.7", @@ -29132,8 +29132,8 @@ "@onflow/config": "1.5.1", "@onflow/interaction": "0.0.11", "@onflow/rlp": "1.2.3", - "@onflow/sdk": "1.5.4", - "@onflow/transport-http": "1.10.3", + "@onflow/sdk": "1.5.5", + "@onflow/transport-http": "1.10.4", "@onflow/types": "1.4.1", "@onflow/util-actor": "1.3.4", "@onflow/util-address": "1.2.3", @@ -29180,15 +29180,15 @@ }, "packages/fcl-react-native": { "name": "@onflow/fcl-react-native", - "version": "1.9.7", + "version": "1.9.9", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.25.7", "@onflow/config": "1.5.1", - "@onflow/fcl-core": "1.13.0", + "@onflow/fcl-core": "1.13.2", "@onflow/interaction": "0.0.11", "@onflow/rlp": "1.2.3", - "@onflow/sdk": "1.5.4", + "@onflow/sdk": "1.5.5", "@onflow/types": "1.4.1", "@onflow/util-actor": "1.3.4", "@onflow/util-address": "1.2.3", @@ -29240,7 +29240,7 @@ }, "packages/fcl-wc": { "name": "@onflow/fcl-wc", - "version": "5.5.0", + "version": "5.5.2", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.25.7", @@ -29268,7 +29268,7 @@ "jest-preset-preact": "^4.1.1" }, "peerDependencies": { - "@onflow/fcl-core": "1.13.0" + "@onflow/fcl-core": "1.13.2" } }, "packages/fcl/node_modules/cross-fetch": { @@ -29359,13 +29359,13 @@ }, "packages/sdk": { "name": "@onflow/sdk", - "version": "1.5.4", + "version": "1.5.5", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.25.7", "@onflow/config": "1.5.1", "@onflow/rlp": "1.2.3", - "@onflow/transport-http": "1.10.3", + "@onflow/transport-http": "1.10.4", "@onflow/typedefs": "1.4.0", "@onflow/util-actor": "1.3.4", "@onflow/util-address": "1.2.3", @@ -29414,13 +29414,13 @@ }, "devDependencies": { "@onflow/fcl-bundle": "1.6.0", - "@onflow/sdk": "1.5.4", + "@onflow/sdk": "1.5.5", "jest": "^29.7.0" } }, "packages/transport-http": { "name": "@onflow/transport-http", - "version": "1.10.3", + "version": "1.10.4", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.25.7", @@ -29437,7 +29437,7 @@ "devDependencies": { "@onflow/fcl-bundle": "1.6.0", "@onflow/rlp": "1.2.3", - "@onflow/sdk": "1.5.4", + "@onflow/sdk": "1.5.5", "@onflow/types": "1.4.1", "jest": "^29.7.0" } diff --git a/packages/fcl-core/src/transaction/index.js b/packages/fcl-core/src/transaction/index.js index bc4ca7b74..d0d7baaf3 100644 --- a/packages/fcl-core/src/transaction/index.js +++ b/packages/fcl-core/src/transaction/index.js @@ -150,20 +150,21 @@ export function transaction( const suppress = opts.suppress || false return new Promise((resolve, reject) => { const unsub = subscribe((txStatus, error) => { - if (!suppress) { + if ((error || txStatus.statusCode) && !suppress) { if (error != null) { reject(error) unsub() - return } else if (txStatus.statusCode === 1) { const transactionError = TransactionError.fromErrorMessage( txStatus.errorMessage ) reject(transactionError) unsub() - return } - } else if (predicate(txStatus)) { + return + } + + if (predicate(txStatus)) { resolve(txStatus) unsub() }