From b0210fc9972405d7cbfc7f255131d466bd326575 Mon Sep 17 00:00:00 2001 From: Alex Werner Date: Tue, 19 Oct 2021 17:49:29 +0200 Subject: [PATCH 1/4] feat: bring back FETCHED_UNCONFIRMED_TRANSACTION / CONFIRMED distinction --- src/types/Storage/methods/importTransaction.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/types/Storage/methods/importTransaction.js b/src/types/Storage/methods/importTransaction.js index 3c9943de..ef7c27f4 100644 --- a/src/types/Storage/methods/importTransaction.js +++ b/src/types/Storage/methods/importTransaction.js @@ -1,7 +1,7 @@ const { Transaction } = require('@dashevo/dashcore-lib'); const { Output } = Transaction; const { InvalidDashcoreTransaction } = require('../../../errors'); -const { FETCHED_CONFIRMED_TRANSACTION } = require('../../../EVENTS'); +const { FETCHED_UNCONFIRMED_TRANSACTION, FETCHED_CONFIRMED_TRANSACTION } = require('../../../EVENTS'); const parseStringifiedTransaction = (stringified) => new Transaction(stringified); /** @@ -51,6 +51,7 @@ const importTransaction = function importTransaction(transaction, transactionMet if (findIndex >= 0) { mappedTransactionsHeight[height][findIndex] = mappedTransactionObject; + hasUpdateStorage = true; } else { mappedTransactionsHeight[height].push(mappedTransactionObject); } @@ -114,10 +115,15 @@ const importTransaction = function importTransaction(transaction, transactionMet addressObject.transactions.push(transaction.hash); }); + // Announce only confirmed transaction imported that are our. if (hasUpdateStorage) { this.lastModified = +new Date(); - // Announce only confirmed transaction imported that are our. - this.announce(FETCHED_CONFIRMED_TRANSACTION, { transaction }); + + if (!transaction.isChainLocked && !transaction.isInstantLocked) { + this.announce(FETCHED_UNCONFIRMED_TRANSACTION, { transaction }); + } else { + this.announce(FETCHED_CONFIRMED_TRANSACTION, { transaction }); + } } }; module.exports = importTransaction; From a8172b07f895fab8c12de7aac6ae9389cdab3c02 Mon Sep 17 00:00:00 2001 From: Konstantin Shuplenkov Date: Mon, 25 Oct 2021 11:53:00 +0300 Subject: [PATCH 2/4] fix: dapi addresses white list applies in regtest mode (#344) --- package-lock.json | 72 +++++++++++++++++++++++------------------------ package.json | 4 +-- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9768d2f7..939d39a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,9 @@ "version": "7.21.0-dev.16", "license": "MIT", "dependencies": { - "@dashevo/dapi-client": "~0.21.0-dev.13", + "@dashevo/dapi-client": "~0.21.2", "@dashevo/dashcore-lib": "~0.19.26", - "@dashevo/dpp": "~0.21.0-dev.8", + "@dashevo/dpp": "~0.21.0", "@dashevo/grpc-common": "~0.5.4", "cbor": "^7.0.5", "crypto-js": "^4.0.0", @@ -434,13 +434,13 @@ } }, "node_modules/@dashevo/dapi-client": { - "version": "0.21.0-dev.13", - "resolved": "https://registry.npmjs.org/@dashevo/dapi-client/-/dapi-client-0.21.0-dev.13.tgz", - "integrity": "sha512-kH8k29ckSu4Qfzkytw7dk11isvsfAhITKEupY16bhb9kQNw34sDzf/mlIWG4yICbMCX6Gb7tvb2X1peoFFOEYg==", + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@dashevo/dapi-client/-/dapi-client-0.21.2.tgz", + "integrity": "sha512-4w1RmIVA7m2hXXf+GJEONIzOgHVZYYHOeAb0Bm0QbJfhSbc6gd6oJdMukaYRN4SVqqQEtNHr17ZT4iNrxAEFXg==", "dependencies": { - "@dashevo/dapi-grpc": "~0.21.0-dev.12", + "@dashevo/dapi-grpc": "~0.21.0", "@dashevo/dashcore-lib": "~0.19.26", - "@dashevo/dpp": "~0.21.0-dev.5", + "@dashevo/dpp": "~0.21.0", "@dashevo/grpc-common": "~0.5.4", "@grpc/grpc-js": "^1.3.7", "axios": "^0.21.1", @@ -451,9 +451,9 @@ } }, "node_modules/@dashevo/dapi-grpc": { - "version": "0.21.0-dev.12", - "resolved": "https://registry.npmjs.org/@dashevo/dapi-grpc/-/dapi-grpc-0.21.0-dev.12.tgz", - "integrity": "sha512-uHsXionXZrNk6Ukrfl4xHinLwZSJQEWSyBlf0jGxEixXovNZEebcWkV4l8loxFQuwH0BvrZT32jGEIVf6w2KWA==", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@dashevo/dapi-grpc/-/dapi-grpc-0.21.0.tgz", + "integrity": "sha512-xIuZuJSqWzCvMiB0Y4ESAzLeW5ACsY88UK0gXRkDOpWYf7UP55YPvkI7TERclkWpB8T2QhYTiWN/On6EBxZZmw==", "dependencies": { "@dashevo/grpc-common": "^0.5.4", "@grpc/grpc-js": "^1.3.6", @@ -481,9 +481,9 @@ } }, "node_modules/@dashevo/dpp": { - "version": "0.21.0-dev.8", - "resolved": "https://registry.npmjs.org/@dashevo/dpp/-/dpp-0.21.0-dev.8.tgz", - "integrity": "sha512-e5EaK7NGLPQrBX4teRtwRHnHH+Yo+rGHRNYQuciV1OHvFZS2fPACBXJfmubRm8X+5caIXuw/M2XSec+eED3Fpg==", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@dashevo/dpp/-/dpp-0.21.0.tgz", + "integrity": "sha512-N3I23x84Yt54xMtmD2HTwGfI9QJPXZt20g6GNudxSrcJPQq01ESMgEW74LNg+Iq3OmdgUMGZN6Rl/z6nKDVTiw==", "dependencies": { "@apidevtools/json-schema-ref-parser": "^8.0.0", "@dashevo/dashcore-lib": "~0.19.25", @@ -529,9 +529,9 @@ } }, "node_modules/@dashevo/dpp/node_modules/nofilter": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.0.3.tgz", - "integrity": "sha512-TN/MCrQmXQk5DyUJ8TGUq1Il8rv4fTsjddLmMopV006QP8DMkglmGgYfQKD5620vXLRXfr8iGI6ZZ4/ZWld2cQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", + "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", "engines": { "node": ">=12.19" } @@ -794,9 +794,9 @@ "integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w==" }, "node_modules/@types/node": { - "version": "12.20.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.27.tgz", - "integrity": "sha512-qZdePUDSLAZRXXV234bLBEUM0nAQjoxbcSwp1rqSMUe1rZ47mwU6OjciR/JvF1Oo8mc0ys6GE0ks0HGgqAZoGg==" + "version": "12.20.33", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.33.tgz", + "integrity": "sha512-5XmYX2GECSa+CxMYaFsr2mrql71Q4EvHjKS+ox/SiwSdaASMoBIWE6UmZqFO+VX1jIcsYLStI4FFoB6V7FeIYw==" }, "node_modules/@webassemblyjs/ast": { "version": "1.9.0", @@ -11135,13 +11135,13 @@ } }, "@dashevo/dapi-client": { - "version": "0.21.0-dev.13", - "resolved": "https://registry.npmjs.org/@dashevo/dapi-client/-/dapi-client-0.21.0-dev.13.tgz", - "integrity": "sha512-kH8k29ckSu4Qfzkytw7dk11isvsfAhITKEupY16bhb9kQNw34sDzf/mlIWG4yICbMCX6Gb7tvb2X1peoFFOEYg==", + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@dashevo/dapi-client/-/dapi-client-0.21.2.tgz", + "integrity": "sha512-4w1RmIVA7m2hXXf+GJEONIzOgHVZYYHOeAb0Bm0QbJfhSbc6gd6oJdMukaYRN4SVqqQEtNHr17ZT4iNrxAEFXg==", "requires": { - "@dashevo/dapi-grpc": "~0.21.0-dev.12", + "@dashevo/dapi-grpc": "~0.21.0", "@dashevo/dashcore-lib": "~0.19.26", - "@dashevo/dpp": "~0.21.0-dev.5", + "@dashevo/dpp": "~0.21.0", "@dashevo/grpc-common": "~0.5.4", "@grpc/grpc-js": "^1.3.7", "axios": "^0.21.1", @@ -11152,9 +11152,9 @@ } }, "@dashevo/dapi-grpc": { - "version": "0.21.0-dev.12", - "resolved": "https://registry.npmjs.org/@dashevo/dapi-grpc/-/dapi-grpc-0.21.0-dev.12.tgz", - "integrity": "sha512-uHsXionXZrNk6Ukrfl4xHinLwZSJQEWSyBlf0jGxEixXovNZEebcWkV4l8loxFQuwH0BvrZT32jGEIVf6w2KWA==", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@dashevo/dapi-grpc/-/dapi-grpc-0.21.0.tgz", + "integrity": "sha512-xIuZuJSqWzCvMiB0Y4ESAzLeW5ACsY88UK0gXRkDOpWYf7UP55YPvkI7TERclkWpB8T2QhYTiWN/On6EBxZZmw==", "requires": { "@dashevo/grpc-common": "^0.5.4", "@grpc/grpc-js": "^1.3.6", @@ -11182,9 +11182,9 @@ } }, "@dashevo/dpp": { - "version": "0.21.0-dev.8", - "resolved": "https://registry.npmjs.org/@dashevo/dpp/-/dpp-0.21.0-dev.8.tgz", - "integrity": "sha512-e5EaK7NGLPQrBX4teRtwRHnHH+Yo+rGHRNYQuciV1OHvFZS2fPACBXJfmubRm8X+5caIXuw/M2XSec+eED3Fpg==", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@dashevo/dpp/-/dpp-0.21.0.tgz", + "integrity": "sha512-N3I23x84Yt54xMtmD2HTwGfI9QJPXZt20g6GNudxSrcJPQq01ESMgEW74LNg+Iq3OmdgUMGZN6Rl/z6nKDVTiw==", "requires": { "@apidevtools/json-schema-ref-parser": "^8.0.0", "@dashevo/dashcore-lib": "~0.19.25", @@ -11223,9 +11223,9 @@ } }, "nofilter": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.0.3.tgz", - "integrity": "sha512-TN/MCrQmXQk5DyUJ8TGUq1Il8rv4fTsjddLmMopV006QP8DMkglmGgYfQKD5620vXLRXfr8iGI6ZZ4/ZWld2cQ==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", + "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==" } } }, @@ -11450,9 +11450,9 @@ "integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w==" }, "@types/node": { - "version": "12.20.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.27.tgz", - "integrity": "sha512-qZdePUDSLAZRXXV234bLBEUM0nAQjoxbcSwp1rqSMUe1rZ47mwU6OjciR/JvF1Oo8mc0ys6GE0ks0HGgqAZoGg==" + "version": "12.20.33", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.33.tgz", + "integrity": "sha512-5XmYX2GECSa+CxMYaFsr2mrql71Q4EvHjKS+ox/SiwSdaASMoBIWE6UmZqFO+VX1jIcsYLStI4FFoB6V7FeIYw==" }, "@webassemblyjs/ast": { "version": "1.9.0", diff --git a/package.json b/package.json index 3259e64e..d2040822 100644 --- a/package.json +++ b/package.json @@ -37,9 +37,9 @@ }, "homepage": "https://github.com/dashevo/wallet-lib#readme", "dependencies": { - "@dashevo/dapi-client": "~0.21.0-dev.13", + "@dashevo/dapi-client": "~0.21.2", "@dashevo/dashcore-lib": "~0.19.26", - "@dashevo/dpp": "~0.21.0-dev.8", + "@dashevo/dpp": "~0.21.0", "@dashevo/grpc-common": "~0.5.4", "cbor": "^7.0.5", "crypto-js": "^4.0.0", From 73027fe4e03b937092ffbbbb3a20e0884558df13 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Mon, 25 Oct 2021 12:54:27 +0300 Subject: [PATCH 3/4] chore(release): bump version to 7.21.0 (#341) --- .github/workflows/.env | 4 ++-- CHANGELOG.md | 38 ++++++++++++++++++++++++++++++++++++++ package-lock.json | 6 +++--- package.json | 2 +- 4 files changed, 44 insertions(+), 6 deletions(-) diff --git a/.github/workflows/.env b/.github/workflows/.env index 081f1c57..f061baa7 100644 --- a/.github/workflows/.env +++ b/.github/workflows/.env @@ -1,4 +1,4 @@ #DRIVE_BRANCH=update-dpp #DAPI_BRANCH=send-metadata-buffer -#DASHMATE_BRANCH=update-dpp -#TEST_SUITE_BRANCH=update-dpp \ No newline at end of file +DASHMATE_BRANCH=v0.21-dev +TEST_SUITE_BRANCH=v0.21-dev diff --git a/CHANGELOG.md b/CHANGELOG.md index 4747bcec..042aa9e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,41 @@ +# [7.21.0](https://github.com/dashevo/wallet-lib/compare/v7.21.0...v7.21.0) (2021-10-21) + + +### Features + +* provide plugin dependencies sorting ([#281](https://github.com/dashevo/wallet-lib/issues/281)) +* **Keychain:** `getHardenedDIP15AccountKey`, `getDIP15ExtendedPrivateKey` ([#282](https://github.com/dashevo/wallet-lib/issues/282)) +* overridable coinbase maturity value ([#322](https://github.com/dashevo/wallet-lib/issues/322)) +* retry policy of unconfirmed transaction from stream ([#304](https://github.com/dashevo/wallet-lib/issues/304)), closes [#303](https://github.com/dashevo/wallet-lib/issues/303) +* implement transaction metadata handling ([#291](https://github.com/dashevo/wallet-lib/issues/291), [#303](https://github.com/dashevo/wallet-lib/issues/303)) +* transaction history ([#295](https://github.com/dashevo/wallet-lib/issues/295)), closes [#303](https://github.com/dashevo/wallet-lib/issues/303) +* **TransactionSyncWorker:** improve stream response handling ([#323](https://github.com/dashevo/wallet-lib/issues/323), [#339](https://github.com/dashevo/wallet-lib/issues/339), [#338](https://github.com/dashevo/wallet-lib/issues/338), [#336](https://github.com/dashevo/wallet-lib/issues/336)) +* prevent broadcast and throw error on transaction below min relay fee ([#305](https://github.com/dashevo/wallet-lib/issues/305)) +* provide watch-only mode for public key and address based wallet ([#290](https://github.com/dashevo/wallet-lib/issues/290)) + + +### Bug Fixes + +* logger doesn't work in the browser ([#330](https://github.com/dashevo/wallet-lib/issues/330)) +* typings fix for `waitForInstantLock` ([#289](https://github.com/dashevo/wallet-lib/issues/289)) +* correct logging of identity fetched ([#310](https://github.com/dashevo/wallet-lib/issues/310)) +* correctly announced when a plugin is initialized ([#321](https://github.com/dashevo/wallet-lib/issues/321)) +* `stream.cancel` were causing double-free and segfault ([#328](https://github.com/dashevo/wallet-lib/issues/328), [#329](https://github.com/dashevo/wallet-lib/issues/329)) +* grpc-web doesn't throw cancel error ([#332](https://github.com/dashevo/wallet-lib/issues/332)) + + +### Refactoring + +* **Keychain**: proper naming for BIP44 and DIP9 get keys methods ([#288](https://github.com/dashevo/wallet-lib/issues/288)) + + +### BREAKING CHANGES + +* `getHardenedBIP44Path` renamed to `getHardenedBIP44HDKey` +* `getHardenedDIP9FeaturePath` renamed to `getHardenedDIP9FeatureHDKey` + + + ## [7.20.1](https://github.com/dashevo/wallet-lib/compare/v7.20.0...v7.20.1) (2021-07-28) diff --git a/package-lock.json b/package-lock.json index 939d39a4..958ab3cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@dashevo/wallet-lib", - "version": "7.21.0-dev.16", + "version": "7.21.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@dashevo/wallet-lib", - "version": "7.21.0-dev.16", + "version": "7.21.0", "license": "MIT", "dependencies": { "@dashevo/dapi-client": "~0.21.2", @@ -438,7 +438,7 @@ "resolved": "https://registry.npmjs.org/@dashevo/dapi-client/-/dapi-client-0.21.2.tgz", "integrity": "sha512-4w1RmIVA7m2hXXf+GJEONIzOgHVZYYHOeAb0Bm0QbJfhSbc6gd6oJdMukaYRN4SVqqQEtNHr17ZT4iNrxAEFXg==", "dependencies": { - "@dashevo/dapi-grpc": "~0.21.0", + "@dashevo/dapi-grpc": "~0.21.0-dev.12", "@dashevo/dashcore-lib": "~0.19.26", "@dashevo/dpp": "~0.21.0", "@dashevo/grpc-common": "~0.5.4", diff --git a/package.json b/package.json index d2040822..b43c5b7c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wallet-lib", - "version": "7.21.0-dev.16", + "version": "7.21.0", "description": "Light wallet library for Dash", "main": "src/index.js", "unpkg": "dist/wallet-lib.min.js", From 059ca53304bfdc41ca53c94a9324260b8d605b60 Mon Sep 17 00:00:00 2001 From: Anton Suprunchuk Date: Tue, 26 Oct 2021 18:43:27 +0300 Subject: [PATCH 4/4] chore: update package-lock.json --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 958ab3cd..16d07630 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@dashevo/wallet-lib", - "version": "7.21.0", + "version": "7.22.0-dev.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@dashevo/wallet-lib", - "version": "7.21.0", + "version": "7.22.0-dev.1", "license": "MIT", "dependencies": { "@dashevo/dapi-client": "~0.21.2", @@ -11139,7 +11139,7 @@ "resolved": "https://registry.npmjs.org/@dashevo/dapi-client/-/dapi-client-0.21.2.tgz", "integrity": "sha512-4w1RmIVA7m2hXXf+GJEONIzOgHVZYYHOeAb0Bm0QbJfhSbc6gd6oJdMukaYRN4SVqqQEtNHr17ZT4iNrxAEFXg==", "requires": { - "@dashevo/dapi-grpc": "~0.21.0", + "@dashevo/dapi-grpc": "~0.21.0-dev.12", "@dashevo/dashcore-lib": "~0.19.26", "@dashevo/dpp": "~0.21.0", "@dashevo/grpc-common": "~0.5.4",