From 0d24dbe1863866f407f5ab006e684c4902fcf0ec Mon Sep 17 00:00:00 2001 From: Kenedy Ribeiro Date: Mon, 11 Sep 2023 14:57:28 -0300 Subject: [PATCH 1/9] CU-86a0jpgg5 - Change NWD to use new version of WcSdk compatible with neon-dappkit --- config/webpack.config.dev.js | 16 +--- config/webpack.config.prod.js | 2 +- package.json | 2 +- yarn.lock | 146 +++++++++++++++------------------- 4 files changed, 69 insertions(+), 97 deletions(-) diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js index 7d634f725..9c3ed84fa 100644 --- a/config/webpack.config.dev.js +++ b/config/webpack.config.dev.js @@ -75,21 +75,7 @@ module.exports = { }, }, { - test: /(@cityofzion\/blockchain-service|@cityofzion\/bs-neo3\/node_modules).*\.(ts|js)x?$/, - loader: 'babel-loader', - options: { - presets: [['@babel/preset-env', { targets: 'defaults' }]], - }, - }, - { - test: /(@cityofzion\/neon-invoker).*\.(ts|js)x?$/, - loader: 'babel-loader', - options: { - presets: [['@babel/preset-env', { targets: 'defaults' }]], - }, - }, - { - test: /(@cityofzion\/neon-parser).*\.(ts|js)x?$/, + test: /(@cityofzion[\\/](neon-parser|neon-invoker|neon-dappkit|blockchain-service|bs-neo3)|neon-parser[\\/]node_modules|neon-dappkit[\\/]node_modules|wallet-connect-sdk-core[\\/]node_modules|wallet-connect-sdk-wallet-core[\\/]node_modules|neon-invoker[\\/]node_modules|blockchain-service[\\/]node_modules|bs-neo3[\\/]node_modules).*\.(ts|js)x?$/, loader: 'babel-loader', options: { presets: [['@babel/preset-env', { targets: 'defaults' }]], diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index 9d404c200..37d0413a0 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -78,7 +78,7 @@ module.exports = { }, }, { - test: /(@cityofzion[\\/](neon-parser|neon-invoker|blockchain-service|bs-neo3)|neon-parser[\\/]node_modules|neon-invoker[\\/]node_modules|blockchain-service[\\/]node_modules|bs-neo3[\\/]node_modules).*\.(ts|js)x?$/, + test: /(@cityofzion[\\/](neon-parser|neon-invoker|neon-dappkit|blockchain-service|bs-neo3)|neon-parser[\\/]node_modules|neon-dappkit[\\/]node_modules|wallet-connect-sdk-core[\\/]node_modules|wallet-connect-sdk-wallet-core[\\/]node_modules|neon-invoker[\\/]node_modules|blockchain-service[\\/]node_modules|bs-neo3[\\/]node_modules).*\.(ts|js)x?$/, loader: 'babel-loader', options: { presets: [['@babel/preset-env', { targets: 'defaults' }]], diff --git a/package.json b/package.json index 85d8f956a..953ddfb71 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "@cityofzion/neon-js-legacy": "npm:@cityofzion/neon-js@3.11.9", "@cityofzion/neon-js-legacy-latest": "npm:@cityofzion/neon-js@4.9.0", "@cityofzion/neon-ledger-next": "npm:@cityofzion/neon-ledger@5.0.0-next.14", - "@cityofzion/wallet-connect-sdk-wallet-react": "2.5.4", + "@cityofzion/wallet-connect-sdk-wallet-react": "2.6.1", "@emotion/react": "^11.10.6", "@emotion/styled": "^11.10.6", "@formatjs/intl-pluralrules": "^1.5.2", diff --git a/yarn.lock b/yarn.lock index c26680f06..d75005209 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2097,16 +2097,6 @@ resolved "https://registry.yarnpkg.com/@cityofzion/neo3-invoker/-/neo3-invoker-1.4.0.tgz#00fff375a47d73d406e9d5ba47868bbd4cbe894f" integrity sha512-BOqJA2e6Kq3QPL/kaMYEjpPCeh9fdKTzRjEi9oIxi0MY5B7nj4rhAVl4l2A06jGNboi+VhToo/gJ/ZVzW/GaeQ== -"@cityofzion/neo3-invoker@1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@cityofzion/neo3-invoker/-/neo3-invoker-1.4.1.tgz#70b617dd73574682f6e3f0b775ab8df2120e49e1" - integrity sha512-2BNSQRydNuGZi7wam/kdvCoTw8m3wq1zbC6QBkkS9maRO/gliLEgDj0hjBazaP+slqtwR8DMdQsgbonJ9oIYEA== - -"@cityofzion/neo3-invoker@1.5.1": - version "1.5.1" - resolved "https://registry.yarnpkg.com/@cityofzion/neo3-invoker/-/neo3-invoker-1.5.1.tgz#13a0f448aac13afa305a806a724fd0a4764915f0" - integrity sha512-P1w9Ajxa3S5lT+cvsjF/ZDpZFuvvg3e/bVC87PBbpD+FysVFsONlZCIomevkSV4LnzCgrxDQ00KzmYOiNHvWcg== - "@cityofzion/neo3-invoker@1.5.2": version "1.5.2" resolved "https://registry.yarnpkg.com/@cityofzion/neo3-invoker/-/neo3-invoker-1.5.2.tgz#0ebf58f8cd74d3b4977aa4cf0efb1b96548b866f" @@ -2117,21 +2107,6 @@ resolved "https://registry.yarnpkg.com/@cityofzion/neo3-parser/-/neo3-parser-1.6.0.tgz#154d60baa6e6c541321f0d1fa796b38f6bed6aa3" integrity sha512-K+j3qaZEuq1cxit+fFziwAAc0hMQTdACbtllU1HUKJZ89dw7z/FY3Bmg12cyZ8tXuiktCloXvUT0Mg/IzoYqdg== -"@cityofzion/neo3-parser@1.6.5": - version "1.6.5" - resolved "https://registry.yarnpkg.com/@cityofzion/neo3-parser/-/neo3-parser-1.6.5.tgz#3744cb18c6ed310604d8bd15ac6286cfe84ec01b" - integrity sha512-0pv+odXwLA0X661f4UJZO7HErkt/2KZ22M9lHd98OAUT99M22i+XBaGrK2GqbLuzVAvoOEW73kSyhhz6Z9uUYg== - -"@cityofzion/neo3-signer@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@cityofzion/neo3-signer/-/neo3-signer-1.1.0.tgz#3fa81977e1778b6acc863c85788a0525ecc4c21a" - integrity sha512-mUJNF5gOuX1aGdbuOwZ+nke03y2GavzYwnti8dr8kzm6lNbn5npLsy4vSHxfgS+gt+TYEeZTtnlf87QkjkEiNQ== - -"@cityofzion/neo3-signer@1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@cityofzion/neo3-signer/-/neo3-signer-1.1.1.tgz#f3435578ec73a6ba170aaa108418dbb0ba17aa85" - integrity sha512-f0JtZajh+brWzXTAp8O9HgM6uLRTHnj6SIGdT/sb9UYHXBd2zB/phrAd9SDJ+tvUFSz7D6Jrek/crCUIaka0Fg== - "@cityofzion/neon-api@^4.9.0": version "4.9.0" resolved "https://registry.yarnpkg.com/@cityofzion/neon-api/-/neon-api-4.9.0.tgz#ab11aef2c132baced5a764ac42573577938eaf9c" @@ -2164,6 +2139,22 @@ loglevel-plugin-prefix "0.8.4" scrypt-js "3.0.1" +"@cityofzion/neon-core@5.5.1", "@cityofzion/neon-core@^5.5.1": + version "5.5.1" + resolved "https://registry.yarnpkg.com/@cityofzion/neon-core/-/neon-core-5.5.1.tgz#80ee2caeef5e1e65dcd98a2a77b7eee4d12d8801" + integrity sha512-cqJ+RYTdUVoUl2e3I5bqgAvYFuqGd2M8lmgUgH/+kf0zS0b8EuKwliauJ2EA56fudwaXtCmmHZTfRBFs+RJ2vw== + dependencies: + bn.js "5.2.1" + bs58 "5.0.0" + buffer "6.0.3" + cross-fetch "^3.1.5" + crypto-js "4.1.1" + elliptic "6.5.4" + ethereum-cryptography "2.0.0" + lodash "4.17.21" + loglevel "1.8.1" + loglevel-plugin-prefix "0.8.4" + "@cityofzion/neon-core@^4.9.0": version "4.9.0" resolved "https://registry.yarnpkg.com/@cityofzion/neon-core/-/neon-core-4.9.0.tgz#aed0c67997534a7ca1a4c4fbef43858551d0cbbb" @@ -2202,6 +2193,28 @@ loglevel "1.8.1" loglevel-plugin-prefix "0.8.4" +"@cityofzion/neon-dappkit-types@0.0.5": + version "0.0.5" + resolved "https://registry.yarnpkg.com/@cityofzion/neon-dappkit-types/-/neon-dappkit-types-0.0.5.tgz#97abeacf09971bc318e864871549f5a00545bc09" + integrity sha512-SRjmfzgI1aNhXdKby4gRrJBveFeSAdttSaLwNfQ/Xq19VwM2NOf2NATg7wDrtTY4sQLKwCyPjPaAePZwKLP8Xw== + +"@cityofzion/neon-dappkit-types@0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@cityofzion/neon-dappkit-types/-/neon-dappkit-types-0.0.6.tgz#0f3f596a72e4fef4c0442a0c35689b70093593b8" + integrity sha512-Q4tkH5SFQhdRBf+tky8H0oCu2BNPALlwadENWsFLgbd5U6LhsAKZtU7mEh/3dQ9v4jq2ll2ZW9Aab+ntXXgOVg== + +"@cityofzion/neon-dappkit@0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@cityofzion/neon-dappkit/-/neon-dappkit-0.0.6.tgz#f4f430b5c4eed1d32b014cd28d5149053c0d21bf" + integrity sha512-LiuT8oqDvQ7pHWBMncpXyvdBDQ+mxrEGTjU+xZTKEdw+tKGLcLM2wuPi4HrP4n+3EBRGQmKXihmsgYLxYFHmWQ== + dependencies: + "@cityofzion/neon-core" "5.5.1" + "@cityofzion/neon-dappkit-types" "0.0.6" + "@cityofzion/neon-js" "5.5.1" + crypto-js "^4.1.1" + elliptic "^6.5.4" + randombytes "^2.1.0" + "@cityofzion/neon-invoker@1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@cityofzion/neon-invoker/-/neon-invoker-1.4.0.tgz#a3177ad66c4b84bb57228418f5c451bc901c1549" @@ -2211,16 +2224,6 @@ "@cityofzion/neon-core" "^5.3.0" "@cityofzion/neon-js" "^5.3.0" -"@cityofzion/neon-invoker@1.5.1": - version "1.5.1" - resolved "https://registry.yarnpkg.com/@cityofzion/neon-invoker/-/neon-invoker-1.5.1.tgz#ba849357b54b717d4b741a8c48f4c6e64a84fe45" - integrity sha512-71eUsYTSm9MzuZcrNspzak+CQ2s4XHQAqNV+M++rwCCSSKqxMWb8GKuLGAI7muEBZv4l8a19PSlbMASWDfegKA== - dependencies: - "@cityofzion/neo3-invoker" "1.5.1" - "@cityofzion/neon-core" "5.3.0" - "@cityofzion/neon-js" "5.3.0" - chai "~4.3.7" - "@cityofzion/neon-invoker@1.5.2": version "1.5.2" resolved "https://registry.yarnpkg.com/@cityofzion/neon-invoker/-/neon-invoker-1.5.2.tgz#9188985659df1998d0138c6be8f36c04d76cb759" @@ -2268,6 +2271,14 @@ "@cityofzion/neon-api" "^5.2.2" "@cityofzion/neon-core" "^5.3.0" +"@cityofzion/neon-js@5.5.1": + version "5.5.1" + resolved "https://registry.yarnpkg.com/@cityofzion/neon-js/-/neon-js-5.5.1.tgz#635b1737c539c7c9fd83f421c7d817315d55baca" + integrity sha512-iCoE5PGKy3Kj36dR3aevkVOKK4yB1Mq/0WEUQzrzMkGOGBNJXa2+cTtmSi39tDkgxSHibvS77S5oZ6QGIXMCdg== + dependencies: + "@cityofzion/neon-api" "^5.4.0" + "@cityofzion/neon-core" "^5.5.1" + "@cityofzion/neon-js@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@cityofzion/neon-js/-/neon-js-5.4.0.tgz#44d8cade7628dfa6c6a49241eef84016f07369a8" @@ -2299,60 +2310,35 @@ "@cityofzion/neo3-parser" "1.6.0" "@cityofzion/neon-js" "^5.3.0" -"@cityofzion/neon-parser@1.6.5": - version "1.6.5" - resolved "https://registry.yarnpkg.com/@cityofzion/neon-parser/-/neon-parser-1.6.5.tgz#8a246630609e25553d2ecb717cb514508006e4c8" - integrity sha512-ekSHeYJdbf+07+X3gK2AS1LVT4xyxBBfgJmgENYbaVjIXQrGHAyZUy+vA9vocR5hJ3ABPjYoa4a5lCqWrQv0Iw== - dependencies: - "@cityofzion/neo3-parser" "1.6.5" - "@cityofzion/neon-core" "5.3.0" - "@cityofzion/neon-js" "5.3.0" - -"@cityofzion/neon-signer@1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@cityofzion/neon-signer/-/neon-signer-1.1.1.tgz#5c779c02825ce19c4f060d8e23b7c998891ee2c7" - integrity sha512-lOQF9B1XsGwkkHbUuSprWfE+HOhlgbLdoLQeFpvnqmb4NA806wWXxbAgRKN4Xt1SLu7Z8MioM4JOVBxXVooO4Q== - dependencies: - "@cityofzion/neo3-signer" "1.1.1" - "@cityofzion/neon-core" "5.3.0" - "@cityofzion/neon-js" "5.3.0" - randombytes "^2.1.0" - -"@cityofzion/wallet-connect-sdk-core@2.5.4": - version "2.5.4" - resolved "https://registry.yarnpkg.com/@cityofzion/wallet-connect-sdk-core/-/wallet-connect-sdk-core-2.5.4.tgz#ab0c5faac76770dd4d4877141973052bf8a5d961" - integrity sha512-vPkwpRuPsrJ0sIGvPkbKQmVgqESpGIR2BnNatCZoBZr0k5mTi66ji+CqZi68/mbIh01AIOs0Mdg9MnXCHkmhBA== +"@cityofzion/wallet-connect-sdk-core@2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@cityofzion/wallet-connect-sdk-core/-/wallet-connect-sdk-core-2.6.0.tgz#4f8e6fc4f2599cc30d92521194bce616dfc3b44d" + integrity sha512-CJn9kK3ILEbSg4qh7RdJVV1PWgM2v7BquSREkQfD+YFsUkdsHMeJzuPzrrC93q+hTlNKSwOpdVDLhlKs92fvoA== dependencies: - "@cityofzion/neo3-invoker" "1.4.1" - "@cityofzion/neo3-signer" "1.1.0" "@cityofzion/neon-core" "5.3.0" + "@cityofzion/neon-dappkit-types" "0.0.5" "@walletconnect/sign-client" "2.0.0-rc.3" "@walletconnect/types" "2.0.0-rc.3" -"@cityofzion/wallet-connect-sdk-wallet-core@2.5.4": - version "2.5.4" - resolved "https://registry.yarnpkg.com/@cityofzion/wallet-connect-sdk-wallet-core/-/wallet-connect-sdk-wallet-core-2.5.4.tgz#b4c5b5a358b09e5ad4f2f89cc556a59c918c5d75" - integrity sha512-+G5CCtzBdFgCbCpDWn0Tk32qP1d4WMqEgxATGcLCWNV/G8mM35wXDXLcQ5B2NrGZtZ/4p1INhhXmViOZ5kbxkg== +"@cityofzion/wallet-connect-sdk-wallet-core@2.6.1": + version "2.6.1" + resolved "https://registry.yarnpkg.com/@cityofzion/wallet-connect-sdk-wallet-core/-/wallet-connect-sdk-wallet-core-2.6.1.tgz#a47c70f7ed0a168be2985fca09a0d5a988365aed" + integrity sha512-HFz9bSZcT7UexyX++F181q3rB4TZUxDlFxC0EN2d2ja6LCmXmvn+wy5Fl5Kayccy0ikOdzvt7oLRRaLP6OSpSg== dependencies: - "@cityofzion/neo3-invoker" "1.5.1" - "@cityofzion/neo3-parser" "1.6.5" - "@cityofzion/neo3-signer" "1.1.1" - "@cityofzion/neon-core" "5.3.0" - "@cityofzion/neon-invoker" "1.5.1" - "@cityofzion/neon-js" "5.3.0" - "@cityofzion/neon-parser" "1.6.5" - "@cityofzion/neon-signer" "1.1.1" - "@cityofzion/wallet-connect-sdk-core" "2.5.4" + "@cityofzion/neon-core" "5.5.1" + "@cityofzion/neon-dappkit" "0.0.6" + "@cityofzion/neon-js" "5.5.1" + "@cityofzion/wallet-connect-sdk-core" "2.6.0" "@walletconnect/sign-client" "2.7.3" "@walletconnect/types" "2.7.3" moment "^2.29.4" -"@cityofzion/wallet-connect-sdk-wallet-react@2.5.4": - version "2.5.4" - resolved "https://registry.yarnpkg.com/@cityofzion/wallet-connect-sdk-wallet-react/-/wallet-connect-sdk-wallet-react-2.5.4.tgz#65e39a70ba263fe83ce763ff26e2dbee6cd488dc" - integrity sha512-ZMXpEEf6FgqqApOtAvP8eOmCT/1TPp+BO0tXLNxJC6NMcZ1MAWxO+m7ED0M9BKbSKAp06SO9JZfF17gEDCODYQ== +"@cityofzion/wallet-connect-sdk-wallet-react@2.6.1": + version "2.6.1" + resolved "https://registry.yarnpkg.com/@cityofzion/wallet-connect-sdk-wallet-react/-/wallet-connect-sdk-wallet-react-2.6.1.tgz#286281cdd27f2bb85812792ee5fd66df0563884b" + integrity sha512-upTbu1aDiDzCxIVdI7u2NDsPg761bibqQ+taQz1SCsQ8e2JeZrGkQL9SY4E2Qa08E213fOwfR/ZiUarQOXjTWQ== dependencies: - "@cityofzion/wallet-connect-sdk-wallet-core" "2.5.4" + "@cityofzion/wallet-connect-sdk-wallet-core" "2.6.1" "@concordance/react@^1.0.0": version "1.0.0" @@ -6890,7 +6876,7 @@ crypto-js@4.0.0: resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.0.0.tgz#2904ab2677a9d042856a2ea2ef80de92e4a36dcc" integrity sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg== -crypto-js@4.1.1: +crypto-js@4.1.1, crypto-js@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.1.1.tgz#9e485bcf03521041bd85844786b83fb7619736cf" integrity sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw== @@ -7935,7 +7921,7 @@ elliptic@6.4.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" -elliptic@6.5.4, elliptic@^6.5.3: +elliptic@6.5.4, elliptic@^6.5.3, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== From 2a27070ec92e0e3ff1ca0e9d3c02db114c4cb878 Mon Sep 17 00:00:00 2001 From: Kenedy Ribeiro Date: Tue, 12 Sep 2023 11:39:14 -0300 Subject: [PATCH 2/9] CU-86a0jpgg5 - Change NWD to use new version of WcSdk compatible with neon-dappkit --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 953ddfb71..9545e3113 100644 --- a/package.json +++ b/package.json @@ -294,7 +294,8 @@ "\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/__mocks__/fileMock.js", "\\.(svg)$": "/__mocks__/svgMock.js", "\\.(css|less|sass|scss)$": "identity-obj-proxy", - "^lodash-es$": "lodash" + "^lodash-es$": "lodash", + "^node:crypto$": "/node_modules/crypto-browserify" }, "testPathIgnorePatterns": [ "__tests__/testHelpers.js", From 3d22dbbc9c34a98766efb717435fc7a9564b5536 Mon Sep 17 00:00:00 2001 From: Maxwell Lasky Date: Mon, 18 Sep 2023 14:55:11 -0600 Subject: [PATCH 3/9] Fixes issue on legacy with ledger transfers (#2523) * Fixes issue on legacy with ledger transfers * lint and revert neon-js change * revert changes to app/actions/authActions.js * fix chain switch bug * Fix type errors * lint --- app/actions/settingsActions.js | 21 ++--- app/ledger/neonLedger.js | 5 +- app/modules/transactions.js | 168 ++++++++++++++++++++------------- package.json | 2 +- 4 files changed, 119 insertions(+), 77 deletions(-) diff --git a/app/actions/settingsActions.js b/app/actions/settingsActions.js index 6c63d2df2..fc03f0ab2 100644 --- a/app/actions/settingsActions.js +++ b/app/actions/settingsActions.js @@ -46,6 +46,8 @@ export const getSettings = async (): Promise => { const settings = await getStorage(STORAGE_KEY) + const { chain } = settings + const tokens = uniqBy( [ ...defaults.tokens, @@ -58,12 +60,18 @@ export const getSettings = async (): Promise => { token => [token.networkId, token.scriptHash].join('-'), ) - return { ...defaults, ...settings, tokens } + const nextSettings = { ...defaults, ...settings, tokens } + const picked = await pick(nextSettings, keys(await DEFAULT_SETTINGS())) + if (chain === 'neo3') { + picked.tokens = await getDefaultTokens('neo3') + } + return picked } export const updateSettings = async (values: Settings = {}) => { const settings = await getSettings() const { chain } = values + const newSettings = { ...settings, ...values, @@ -92,13 +100,4 @@ export const updateSettingsActions = createActions( (values: Settings = {}) => (): Promise => updateSettings(values), ) -export default createActions(ID, () => async (): Promise => { - const settings = await getSettings() - const { chain } = settings - - const picked = await pick(settings, keys(await DEFAULT_SETTINGS())) - if (chain === 'neo3') { - picked.tokens = await getDefaultTokens('neo3') - } - return picked -}) +export default createActions(ID, () => (): Promise => getSettings()) diff --git a/app/ledger/neonLedger.js b/app/ledger/neonLedger.js index 54e9ecf66..65e2be5fc 100644 --- a/app/ledger/neonLedger.js +++ b/app/ledger/neonLedger.js @@ -8,6 +8,8 @@ import * as n3ledger from '@cityofzion/neon-ledger-next' import asyncWrap from '../core/asyncHelper' import { BIP44_PATH } from '../core/constants' +const N2 = require('@cityofzion/neon-js-legacy-latest') + const VALID_STATUS = 0x9000 const MSG_TOO_BIG = 0x6d08 const APP_CLOSED = 0x6e00 @@ -318,10 +320,11 @@ export const legacySignWithLedger = async ( ? tx.serializeTransaction(unsignedTx, false) : unsignedTx const invocationScript = `40${await ledger.getSignature(data, acct)}` - const verificationScript = wallet.getVerificationScriptFromPublicKey( + const verificationScript = N2.wallet.getVerificationScriptFromPublicKey( publicKeyEncoded, ) const txObj = tx.deserializeTransaction(data) + txObj.scripts.push({ invocationScript, verificationScript }) return tx.serializeTransaction(txObj) } finally { diff --git a/app/modules/transactions.js b/app/modules/transactions.js index 4346c0691..0946b36a9 100644 --- a/app/modules/transactions.js +++ b/app/modules/transactions.js @@ -33,6 +33,7 @@ import { import { toNumber } from '../core/math' import { getNode, getRPCEndpoint } from '../actions/nodeStorageActions' import { addPendingTransaction } from '../actions/pendingTransactionActions' +import { getSettings } from '../actions/settingsActions' const N2 = require('@cityofzion/neon-js-legacy-latest') @@ -60,7 +61,7 @@ export const buildIntents = (sendEntries: Array) => { const assetEntries = extractAssets(sendEntries) // $FlowFixMe return flatMap(assetEntries, ({ address, amount, symbol }) => - api.makeIntent({ [symbol]: toNumber(amount) }, address), + N2.api.makeIntent({ [symbol]: toNumber(amount) }, address), ) } @@ -90,18 +91,48 @@ export const buildTransferScript = ( return scriptBuilder.str } -const makeRequest = ( +const makeRequest = async ( sendEntries: Array, config: Object, script: string, + isHardwareSend?: boolean, ) => { config.intents = buildIntents(sendEntries) + // eslint-disable-next-line const apiProvider = new N2.api.neoCli.instance(config.url) config.api = apiProvider config.script = script - config.gas = !script ? 0 : undefined - return script ? api.doInvoke(config) : api.sendAsset(config) + config.gas = !script ? undefined : 0 + + config = await N2.api.fillSigningFunction(config) + config = await N2.api.fillUrl(config) + config = await N2.api.fillBalance(config) + + if (isHardwareSend) { + if (script) { + return api.doInvoke(config).catch(e => { + if (e.message === 'this.str.substr is not a function') { + return { + response: { + result: true, + }, + } + } + }) + } + config = await N2.api.createContractTx(config) + return api.sendAsset(config).catch(e => { + if (e.message === 'this.str.substr is not a function') { + return { + response: { + result: true, + }, + } + } + }) + } + return script ? N2.api.doInvoke(config) : N2.api.sendAsset(config) } export const generateBalanceInfo = ( @@ -189,9 +220,10 @@ const buildNep17IntentsFromEntries = ( ) => sendEntries.map(entry => { const { address, amount, symbol } = entry + const token = tokens.find( // eslint-disable-next-line eqeqeq - t => t.networkId == 2 && t.symbol === symbol, + t => Number(t?.networkId) == 2 && t?.symbol === symbol, ) const contractHash = token ? token.scriptHash @@ -220,69 +252,73 @@ export const calculateN3Fees = ({ const FROM_ACCOUNT = new n3Wallet.Account(wif) const tokenBalances = getTokenBalances(state) const tokensBalanceMap = keyBy(tokenBalances, 'symbol') - const { tokens } = state.spunky.settings.data + const settings = await getSettings() + const tokens = settings?.tokens ?? [] - let endpoint = await getNode(net) - if (!endpoint) { - endpoint = await getRPCEndpoint(net) - } - const client = new n3Rpc.NeoServerRpcClient(endpoint) + if (tokens.length) { + let endpoint = await getNode(net) + if (!endpoint) { + endpoint = await getRPCEndpoint(net) + } + const client = new n3Rpc.NeoServerRpcClient(endpoint) - const intents = buildNep17IntentsFromEntries( - sendEntries, - tokens, - tokensBalanceMap, - { account: FROM_ACCOUNT }, - ) + const intents = buildNep17IntentsFromEntries( + sendEntries, + tokens, + tokensBalanceMap, + { account: FROM_ACCOUNT }, + ) - const txBuilder = new n3Api.TransactionBuilder() - for (const intent of intents) { - if (intent.decimalAmt) { - const [tokenInfo] = await n3Api.getTokenInfos( - [intent.contractHash], - client, - ) - const amt = n3U.BigInteger.fromDecimal( - intent.decimalAmt, - tokenInfo.decimals, - ) - txBuilder.addNep17Transfer( - intent.from, - intent.to, - intent.contractHash, - amt, - ) + const txBuilder = new n3Api.TransactionBuilder() + for (const intent of intents) { + if (intent.decimalAmt) { + const [tokenInfo] = await n3Api.getTokenInfos( + [intent.contractHash], + client, + ) + const amt = n3U.BigInteger.fromDecimal( + intent.decimalAmt, + tokenInfo.decimals, + ) + txBuilder.addNep17Transfer( + intent.from, + intent.to, + intent.contractHash, + amt, + ) + } } - } - const { feePerByte, executionFeeFactor } = await n3Api.getFeeInformation( - client, - ) + const { + feePerByte, + executionFeeFactor, + } = await n3Api.getFeeInformation(client) - const txn = txBuilder.build() + const txn = txBuilder.build() - const networkFee = await n3Api.calculateNetworkFee( - txn, - feePerByte, - executionFeeFactor, - ) + const networkFee = await n3Api.calculateNetworkFee( + txn, + feePerByte, + executionFeeFactor, + ) - const invokeFunctionResponse = await client.invokeScript( - n3U.HexString.fromHex(txn.script), - [ - { - account: FROM_ACCOUNT.scriptHash, - scopes: tx.WitnessScope.CalledByEntry, - }, - ], - ) - const requiredSystemFee = n3U.BigInteger.fromNumber( - invokeFunctionResponse.gasconsumed, - ) + const invokeFunctionResponse = await client.invokeScript( + n3U.HexString.fromHex(txn.script), + [ + { + account: FROM_ACCOUNT.scriptHash, + scopes: tx.WitnessScope.CalledByEntry, + }, + ], + ) + const requiredSystemFee = n3U.BigInteger.fromNumber( + invokeFunctionResponse.gasconsumed, + ) - return resolve({ - systemFee: requiredSystemFee.toDecimal(8), - networkFee: networkFee.toDecimal(8), - }) + return resolve({ + systemFee: requiredSystemFee.toDecimal(8), + networkFee: networkFee.toDecimal(8), + }) + } } catch (e) { console.error(e) reject(e) @@ -543,9 +579,14 @@ export const sendTransaction = ({ return resolve(config) } - const { response } = await makeRequest(sendEntries, config, script) + const { response } = await makeRequest( + sendEntries, + config, + script, + isHardwareSend, + ) - if (!response.result) { + if (!response?.result) { throw new Error('Rejected by RPC server.') } @@ -555,7 +596,7 @@ export const sendTransaction = ({ 'Transaction pending! Your balance will automatically update when the blockchain has processed it.', }), ) - return resolve(response) + return resolve(config) } catch (err) { console.error({ err }) return checkConfigForFees(config) @@ -569,7 +610,6 @@ export const sendTransaction = ({ }) } finally { const hash = get(config, 'tx.hash') - if (!isWatchOnly) { dispatch( addPendingTransaction.call({ diff --git a/package.json b/package.json index 0f0db2ed3..05c22237c 100644 --- a/package.json +++ b/package.json @@ -314,4 +314,4 @@ "setupTestFrameworkScriptFile": "/__tests__/setupTests.js", "testURL": "http://localhost" } -} \ No newline at end of file +} From d765228b5871900365a1bc511997a0b3284b877a Mon Sep 17 00:00:00 2001 From: Maxwell Lasky Date: Mon, 18 Sep 2023 14:55:29 -0600 Subject: [PATCH 4/9] Bump version to 2.20.4 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 05c22237c..48db3ccb9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Neon", - "version": "2.20.3", + "version": "2.20.4", "main": "./main.js", "description": "Light wallet for NEO blockchain", "homepage": "https://github.com/CityOfZion/neon-wallet", @@ -314,4 +314,4 @@ "setupTestFrameworkScriptFile": "/__tests__/setupTests.js", "testURL": "http://localhost" } -} +} \ No newline at end of file From 4fbf6e1ae65ba25a5917f084dff1c9fc321f4143 Mon Sep 17 00:00:00 2001 From: Maxwell Lasky Date: Mon, 18 Sep 2023 16:29:34 -0600 Subject: [PATCH 5/9] Fixes broken loaders (#2524) --- config/webpack.config.dev.js | 2 +- config/webpack.config.prod.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js index 9c3ed84fa..6ca4704a6 100644 --- a/config/webpack.config.dev.js +++ b/config/webpack.config.dev.js @@ -75,7 +75,7 @@ module.exports = { }, }, { - test: /(@cityofzion[\\/](neon-parser|neon-invoker|neon-dappkit|blockchain-service|bs-neo3)|neon-parser[\\/]node_modules|neon-dappkit[\\/]node_modules|wallet-connect-sdk-core[\\/]node_modules|wallet-connect-sdk-wallet-core[\\/]node_modules|neon-invoker[\\/]node_modules|blockchain-service[\\/]node_modules|bs-neo3[\\/]node_modules).*\.(ts|js)x?$/, + test: /(@cityofzion\/(neon-parser|neon-invoker|neon-dappkit|blockchain-service|bs-neo3|neon-core)|node_modules\/(neon-parser|neon-dappkit|wallet-connect-sdk-core|wallet-connect-sdk-wallet-core|neon-invoker|blockchain-service|bs-neo3|neon-core)).*\.(ts|js)x?$/, loader: 'babel-loader', options: { presets: [['@babel/preset-env', { targets: 'defaults' }]], diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index 37d0413a0..c71e69d9e 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -78,7 +78,7 @@ module.exports = { }, }, { - test: /(@cityofzion[\\/](neon-parser|neon-invoker|neon-dappkit|blockchain-service|bs-neo3)|neon-parser[\\/]node_modules|neon-dappkit[\\/]node_modules|wallet-connect-sdk-core[\\/]node_modules|wallet-connect-sdk-wallet-core[\\/]node_modules|neon-invoker[\\/]node_modules|blockchain-service[\\/]node_modules|bs-neo3[\\/]node_modules).*\.(ts|js)x?$/, + test: /(@cityofzion\/(neon-parser|neon-invoker|neon-dappkit|blockchain-service|bs-neo3|neon-core)|node_modules\/(neon-parser|neon-dappkit|wallet-connect-sdk-core|wallet-connect-sdk-wallet-core|neon-invoker|blockchain-service|bs-neo3|neon-core)).*\.(ts|js)x?$/, loader: 'babel-loader', options: { presets: [['@babel/preset-env', { targets: 'defaults' }]], From 61421ed9f124a121d5501a0d20080429cf890eb2 Mon Sep 17 00:00:00 2001 From: Maxwell Lasky Date: Mon, 18 Sep 2023 16:29:43 -0600 Subject: [PATCH 6/9] Bump version to 2.20.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 48db3ccb9..060e4c489 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Neon", - "version": "2.20.4", + "version": "2.20.5", "main": "./main.js", "description": "Light wallet for NEO blockchain", "homepage": "https://github.com/CityOfZion/neon-wallet", From 3efb284a73a5aab0cdee1682e06efa908b9688aa Mon Sep 17 00:00:00 2001 From: Maxwell Lasky Date: Mon, 18 Sep 2023 16:52:30 -0600 Subject: [PATCH 7/9] Revert "Fixes broken loaders (#2524)" (#2525) This reverts commit 4fbf6e1ae65ba25a5917f084dff1c9fc321f4143. --- config/webpack.config.dev.js | 2 +- config/webpack.config.prod.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js index 6ca4704a6..9c3ed84fa 100644 --- a/config/webpack.config.dev.js +++ b/config/webpack.config.dev.js @@ -75,7 +75,7 @@ module.exports = { }, }, { - test: /(@cityofzion\/(neon-parser|neon-invoker|neon-dappkit|blockchain-service|bs-neo3|neon-core)|node_modules\/(neon-parser|neon-dappkit|wallet-connect-sdk-core|wallet-connect-sdk-wallet-core|neon-invoker|blockchain-service|bs-neo3|neon-core)).*\.(ts|js)x?$/, + test: /(@cityofzion[\\/](neon-parser|neon-invoker|neon-dappkit|blockchain-service|bs-neo3)|neon-parser[\\/]node_modules|neon-dappkit[\\/]node_modules|wallet-connect-sdk-core[\\/]node_modules|wallet-connect-sdk-wallet-core[\\/]node_modules|neon-invoker[\\/]node_modules|blockchain-service[\\/]node_modules|bs-neo3[\\/]node_modules).*\.(ts|js)x?$/, loader: 'babel-loader', options: { presets: [['@babel/preset-env', { targets: 'defaults' }]], diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index c71e69d9e..37d0413a0 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -78,7 +78,7 @@ module.exports = { }, }, { - test: /(@cityofzion\/(neon-parser|neon-invoker|neon-dappkit|blockchain-service|bs-neo3|neon-core)|node_modules\/(neon-parser|neon-dappkit|wallet-connect-sdk-core|wallet-connect-sdk-wallet-core|neon-invoker|blockchain-service|bs-neo3|neon-core)).*\.(ts|js)x?$/, + test: /(@cityofzion[\\/](neon-parser|neon-invoker|neon-dappkit|blockchain-service|bs-neo3)|neon-parser[\\/]node_modules|neon-dappkit[\\/]node_modules|wallet-connect-sdk-core[\\/]node_modules|wallet-connect-sdk-wallet-core[\\/]node_modules|neon-invoker[\\/]node_modules|blockchain-service[\\/]node_modules|bs-neo3[\\/]node_modules).*\.(ts|js)x?$/, loader: 'babel-loader', options: { presets: [['@babel/preset-env', { targets: 'defaults' }]], From 373936018b07378d4d8c8a37d645de5bbdf34a44 Mon Sep 17 00:00:00 2001 From: Maxwell Lasky Date: Mon, 18 Sep 2023 16:53:14 -0600 Subject: [PATCH 8/9] Revert "CU-86a0jpgg5 - Change NWD to use new version of WcSdk compatible with neon-dappkit" (#2526) --- config/webpack.config.dev.js | 16 +++- config/webpack.config.prod.js | 2 +- package.json | 5 +- yarn.lock | 146 +++++++++++++++++++--------------- 4 files changed, 98 insertions(+), 71 deletions(-) diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js index 9c3ed84fa..7d634f725 100644 --- a/config/webpack.config.dev.js +++ b/config/webpack.config.dev.js @@ -75,7 +75,21 @@ module.exports = { }, }, { - test: /(@cityofzion[\\/](neon-parser|neon-invoker|neon-dappkit|blockchain-service|bs-neo3)|neon-parser[\\/]node_modules|neon-dappkit[\\/]node_modules|wallet-connect-sdk-core[\\/]node_modules|wallet-connect-sdk-wallet-core[\\/]node_modules|neon-invoker[\\/]node_modules|blockchain-service[\\/]node_modules|bs-neo3[\\/]node_modules).*\.(ts|js)x?$/, + test: /(@cityofzion\/blockchain-service|@cityofzion\/bs-neo3\/node_modules).*\.(ts|js)x?$/, + loader: 'babel-loader', + options: { + presets: [['@babel/preset-env', { targets: 'defaults' }]], + }, + }, + { + test: /(@cityofzion\/neon-invoker).*\.(ts|js)x?$/, + loader: 'babel-loader', + options: { + presets: [['@babel/preset-env', { targets: 'defaults' }]], + }, + }, + { + test: /(@cityofzion\/neon-parser).*\.(ts|js)x?$/, loader: 'babel-loader', options: { presets: [['@babel/preset-env', { targets: 'defaults' }]], diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index 37d0413a0..9d404c200 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -78,7 +78,7 @@ module.exports = { }, }, { - test: /(@cityofzion[\\/](neon-parser|neon-invoker|neon-dappkit|blockchain-service|bs-neo3)|neon-parser[\\/]node_modules|neon-dappkit[\\/]node_modules|wallet-connect-sdk-core[\\/]node_modules|wallet-connect-sdk-wallet-core[\\/]node_modules|neon-invoker[\\/]node_modules|blockchain-service[\\/]node_modules|bs-neo3[\\/]node_modules).*\.(ts|js)x?$/, + test: /(@cityofzion[\\/](neon-parser|neon-invoker|blockchain-service|bs-neo3)|neon-parser[\\/]node_modules|neon-invoker[\\/]node_modules|blockchain-service[\\/]node_modules|bs-neo3[\\/]node_modules).*\.(ts|js)x?$/, loader: 'babel-loader', options: { presets: [['@babel/preset-env', { targets: 'defaults' }]], diff --git a/package.json b/package.json index 060e4c489..6c69f9d7f 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "@cityofzion/neon-js-legacy": "npm:@cityofzion/neon-js@3.11.9", "@cityofzion/neon-js-legacy-latest": "npm:@cityofzion/neon-js@4.9.0", "@cityofzion/neon-ledger-next": "npm:@cityofzion/neon-ledger@5.0.0-next.14", - "@cityofzion/wallet-connect-sdk-wallet-react": "2.6.1", + "@cityofzion/wallet-connect-sdk-wallet-react": "2.5.4", "@emotion/react": "^11.10.6", "@emotion/styled": "^11.10.6", "@formatjs/intl-pluralrules": "^1.5.2", @@ -294,8 +294,7 @@ "\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/__mocks__/fileMock.js", "\\.(svg)$": "/__mocks__/svgMock.js", "\\.(css|less|sass|scss)$": "identity-obj-proxy", - "^lodash-es$": "lodash", - "^node:crypto$": "/node_modules/crypto-browserify" + "^lodash-es$": "lodash" }, "testPathIgnorePatterns": [ "__tests__/testHelpers.js", diff --git a/yarn.lock b/yarn.lock index d75005209..c26680f06 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2097,6 +2097,16 @@ resolved "https://registry.yarnpkg.com/@cityofzion/neo3-invoker/-/neo3-invoker-1.4.0.tgz#00fff375a47d73d406e9d5ba47868bbd4cbe894f" integrity sha512-BOqJA2e6Kq3QPL/kaMYEjpPCeh9fdKTzRjEi9oIxi0MY5B7nj4rhAVl4l2A06jGNboi+VhToo/gJ/ZVzW/GaeQ== +"@cityofzion/neo3-invoker@1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@cityofzion/neo3-invoker/-/neo3-invoker-1.4.1.tgz#70b617dd73574682f6e3f0b775ab8df2120e49e1" + integrity sha512-2BNSQRydNuGZi7wam/kdvCoTw8m3wq1zbC6QBkkS9maRO/gliLEgDj0hjBazaP+slqtwR8DMdQsgbonJ9oIYEA== + +"@cityofzion/neo3-invoker@1.5.1": + version "1.5.1" + resolved "https://registry.yarnpkg.com/@cityofzion/neo3-invoker/-/neo3-invoker-1.5.1.tgz#13a0f448aac13afa305a806a724fd0a4764915f0" + integrity sha512-P1w9Ajxa3S5lT+cvsjF/ZDpZFuvvg3e/bVC87PBbpD+FysVFsONlZCIomevkSV4LnzCgrxDQ00KzmYOiNHvWcg== + "@cityofzion/neo3-invoker@1.5.2": version "1.5.2" resolved "https://registry.yarnpkg.com/@cityofzion/neo3-invoker/-/neo3-invoker-1.5.2.tgz#0ebf58f8cd74d3b4977aa4cf0efb1b96548b866f" @@ -2107,6 +2117,21 @@ resolved "https://registry.yarnpkg.com/@cityofzion/neo3-parser/-/neo3-parser-1.6.0.tgz#154d60baa6e6c541321f0d1fa796b38f6bed6aa3" integrity sha512-K+j3qaZEuq1cxit+fFziwAAc0hMQTdACbtllU1HUKJZ89dw7z/FY3Bmg12cyZ8tXuiktCloXvUT0Mg/IzoYqdg== +"@cityofzion/neo3-parser@1.6.5": + version "1.6.5" + resolved "https://registry.yarnpkg.com/@cityofzion/neo3-parser/-/neo3-parser-1.6.5.tgz#3744cb18c6ed310604d8bd15ac6286cfe84ec01b" + integrity sha512-0pv+odXwLA0X661f4UJZO7HErkt/2KZ22M9lHd98OAUT99M22i+XBaGrK2GqbLuzVAvoOEW73kSyhhz6Z9uUYg== + +"@cityofzion/neo3-signer@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@cityofzion/neo3-signer/-/neo3-signer-1.1.0.tgz#3fa81977e1778b6acc863c85788a0525ecc4c21a" + integrity sha512-mUJNF5gOuX1aGdbuOwZ+nke03y2GavzYwnti8dr8kzm6lNbn5npLsy4vSHxfgS+gt+TYEeZTtnlf87QkjkEiNQ== + +"@cityofzion/neo3-signer@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@cityofzion/neo3-signer/-/neo3-signer-1.1.1.tgz#f3435578ec73a6ba170aaa108418dbb0ba17aa85" + integrity sha512-f0JtZajh+brWzXTAp8O9HgM6uLRTHnj6SIGdT/sb9UYHXBd2zB/phrAd9SDJ+tvUFSz7D6Jrek/crCUIaka0Fg== + "@cityofzion/neon-api@^4.9.0": version "4.9.0" resolved "https://registry.yarnpkg.com/@cityofzion/neon-api/-/neon-api-4.9.0.tgz#ab11aef2c132baced5a764ac42573577938eaf9c" @@ -2139,22 +2164,6 @@ loglevel-plugin-prefix "0.8.4" scrypt-js "3.0.1" -"@cityofzion/neon-core@5.5.1", "@cityofzion/neon-core@^5.5.1": - version "5.5.1" - resolved "https://registry.yarnpkg.com/@cityofzion/neon-core/-/neon-core-5.5.1.tgz#80ee2caeef5e1e65dcd98a2a77b7eee4d12d8801" - integrity sha512-cqJ+RYTdUVoUl2e3I5bqgAvYFuqGd2M8lmgUgH/+kf0zS0b8EuKwliauJ2EA56fudwaXtCmmHZTfRBFs+RJ2vw== - dependencies: - bn.js "5.2.1" - bs58 "5.0.0" - buffer "6.0.3" - cross-fetch "^3.1.5" - crypto-js "4.1.1" - elliptic "6.5.4" - ethereum-cryptography "2.0.0" - lodash "4.17.21" - loglevel "1.8.1" - loglevel-plugin-prefix "0.8.4" - "@cityofzion/neon-core@^4.9.0": version "4.9.0" resolved "https://registry.yarnpkg.com/@cityofzion/neon-core/-/neon-core-4.9.0.tgz#aed0c67997534a7ca1a4c4fbef43858551d0cbbb" @@ -2193,28 +2202,6 @@ loglevel "1.8.1" loglevel-plugin-prefix "0.8.4" -"@cityofzion/neon-dappkit-types@0.0.5": - version "0.0.5" - resolved "https://registry.yarnpkg.com/@cityofzion/neon-dappkit-types/-/neon-dappkit-types-0.0.5.tgz#97abeacf09971bc318e864871549f5a00545bc09" - integrity sha512-SRjmfzgI1aNhXdKby4gRrJBveFeSAdttSaLwNfQ/Xq19VwM2NOf2NATg7wDrtTY4sQLKwCyPjPaAePZwKLP8Xw== - -"@cityofzion/neon-dappkit-types@0.0.6": - version "0.0.6" - resolved "https://registry.yarnpkg.com/@cityofzion/neon-dappkit-types/-/neon-dappkit-types-0.0.6.tgz#0f3f596a72e4fef4c0442a0c35689b70093593b8" - integrity sha512-Q4tkH5SFQhdRBf+tky8H0oCu2BNPALlwadENWsFLgbd5U6LhsAKZtU7mEh/3dQ9v4jq2ll2ZW9Aab+ntXXgOVg== - -"@cityofzion/neon-dappkit@0.0.6": - version "0.0.6" - resolved "https://registry.yarnpkg.com/@cityofzion/neon-dappkit/-/neon-dappkit-0.0.6.tgz#f4f430b5c4eed1d32b014cd28d5149053c0d21bf" - integrity sha512-LiuT8oqDvQ7pHWBMncpXyvdBDQ+mxrEGTjU+xZTKEdw+tKGLcLM2wuPi4HrP4n+3EBRGQmKXihmsgYLxYFHmWQ== - dependencies: - "@cityofzion/neon-core" "5.5.1" - "@cityofzion/neon-dappkit-types" "0.0.6" - "@cityofzion/neon-js" "5.5.1" - crypto-js "^4.1.1" - elliptic "^6.5.4" - randombytes "^2.1.0" - "@cityofzion/neon-invoker@1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@cityofzion/neon-invoker/-/neon-invoker-1.4.0.tgz#a3177ad66c4b84bb57228418f5c451bc901c1549" @@ -2224,6 +2211,16 @@ "@cityofzion/neon-core" "^5.3.0" "@cityofzion/neon-js" "^5.3.0" +"@cityofzion/neon-invoker@1.5.1": + version "1.5.1" + resolved "https://registry.yarnpkg.com/@cityofzion/neon-invoker/-/neon-invoker-1.5.1.tgz#ba849357b54b717d4b741a8c48f4c6e64a84fe45" + integrity sha512-71eUsYTSm9MzuZcrNspzak+CQ2s4XHQAqNV+M++rwCCSSKqxMWb8GKuLGAI7muEBZv4l8a19PSlbMASWDfegKA== + dependencies: + "@cityofzion/neo3-invoker" "1.5.1" + "@cityofzion/neon-core" "5.3.0" + "@cityofzion/neon-js" "5.3.0" + chai "~4.3.7" + "@cityofzion/neon-invoker@1.5.2": version "1.5.2" resolved "https://registry.yarnpkg.com/@cityofzion/neon-invoker/-/neon-invoker-1.5.2.tgz#9188985659df1998d0138c6be8f36c04d76cb759" @@ -2271,14 +2268,6 @@ "@cityofzion/neon-api" "^5.2.2" "@cityofzion/neon-core" "^5.3.0" -"@cityofzion/neon-js@5.5.1": - version "5.5.1" - resolved "https://registry.yarnpkg.com/@cityofzion/neon-js/-/neon-js-5.5.1.tgz#635b1737c539c7c9fd83f421c7d817315d55baca" - integrity sha512-iCoE5PGKy3Kj36dR3aevkVOKK4yB1Mq/0WEUQzrzMkGOGBNJXa2+cTtmSi39tDkgxSHibvS77S5oZ6QGIXMCdg== - dependencies: - "@cityofzion/neon-api" "^5.4.0" - "@cityofzion/neon-core" "^5.5.1" - "@cityofzion/neon-js@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@cityofzion/neon-js/-/neon-js-5.4.0.tgz#44d8cade7628dfa6c6a49241eef84016f07369a8" @@ -2310,35 +2299,60 @@ "@cityofzion/neo3-parser" "1.6.0" "@cityofzion/neon-js" "^5.3.0" -"@cityofzion/wallet-connect-sdk-core@2.6.0": - version "2.6.0" - resolved "https://registry.yarnpkg.com/@cityofzion/wallet-connect-sdk-core/-/wallet-connect-sdk-core-2.6.0.tgz#4f8e6fc4f2599cc30d92521194bce616dfc3b44d" - integrity sha512-CJn9kK3ILEbSg4qh7RdJVV1PWgM2v7BquSREkQfD+YFsUkdsHMeJzuPzrrC93q+hTlNKSwOpdVDLhlKs92fvoA== +"@cityofzion/neon-parser@1.6.5": + version "1.6.5" + resolved "https://registry.yarnpkg.com/@cityofzion/neon-parser/-/neon-parser-1.6.5.tgz#8a246630609e25553d2ecb717cb514508006e4c8" + integrity sha512-ekSHeYJdbf+07+X3gK2AS1LVT4xyxBBfgJmgENYbaVjIXQrGHAyZUy+vA9vocR5hJ3ABPjYoa4a5lCqWrQv0Iw== dependencies: + "@cityofzion/neo3-parser" "1.6.5" + "@cityofzion/neon-core" "5.3.0" + "@cityofzion/neon-js" "5.3.0" + +"@cityofzion/neon-signer@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@cityofzion/neon-signer/-/neon-signer-1.1.1.tgz#5c779c02825ce19c4f060d8e23b7c998891ee2c7" + integrity sha512-lOQF9B1XsGwkkHbUuSprWfE+HOhlgbLdoLQeFpvnqmb4NA806wWXxbAgRKN4Xt1SLu7Z8MioM4JOVBxXVooO4Q== + dependencies: + "@cityofzion/neo3-signer" "1.1.1" + "@cityofzion/neon-core" "5.3.0" + "@cityofzion/neon-js" "5.3.0" + randombytes "^2.1.0" + +"@cityofzion/wallet-connect-sdk-core@2.5.4": + version "2.5.4" + resolved "https://registry.yarnpkg.com/@cityofzion/wallet-connect-sdk-core/-/wallet-connect-sdk-core-2.5.4.tgz#ab0c5faac76770dd4d4877141973052bf8a5d961" + integrity sha512-vPkwpRuPsrJ0sIGvPkbKQmVgqESpGIR2BnNatCZoBZr0k5mTi66ji+CqZi68/mbIh01AIOs0Mdg9MnXCHkmhBA== + dependencies: + "@cityofzion/neo3-invoker" "1.4.1" + "@cityofzion/neo3-signer" "1.1.0" "@cityofzion/neon-core" "5.3.0" - "@cityofzion/neon-dappkit-types" "0.0.5" "@walletconnect/sign-client" "2.0.0-rc.3" "@walletconnect/types" "2.0.0-rc.3" -"@cityofzion/wallet-connect-sdk-wallet-core@2.6.1": - version "2.6.1" - resolved "https://registry.yarnpkg.com/@cityofzion/wallet-connect-sdk-wallet-core/-/wallet-connect-sdk-wallet-core-2.6.1.tgz#a47c70f7ed0a168be2985fca09a0d5a988365aed" - integrity sha512-HFz9bSZcT7UexyX++F181q3rB4TZUxDlFxC0EN2d2ja6LCmXmvn+wy5Fl5Kayccy0ikOdzvt7oLRRaLP6OSpSg== +"@cityofzion/wallet-connect-sdk-wallet-core@2.5.4": + version "2.5.4" + resolved "https://registry.yarnpkg.com/@cityofzion/wallet-connect-sdk-wallet-core/-/wallet-connect-sdk-wallet-core-2.5.4.tgz#b4c5b5a358b09e5ad4f2f89cc556a59c918c5d75" + integrity sha512-+G5CCtzBdFgCbCpDWn0Tk32qP1d4WMqEgxATGcLCWNV/G8mM35wXDXLcQ5B2NrGZtZ/4p1INhhXmViOZ5kbxkg== dependencies: - "@cityofzion/neon-core" "5.5.1" - "@cityofzion/neon-dappkit" "0.0.6" - "@cityofzion/neon-js" "5.5.1" - "@cityofzion/wallet-connect-sdk-core" "2.6.0" + "@cityofzion/neo3-invoker" "1.5.1" + "@cityofzion/neo3-parser" "1.6.5" + "@cityofzion/neo3-signer" "1.1.1" + "@cityofzion/neon-core" "5.3.0" + "@cityofzion/neon-invoker" "1.5.1" + "@cityofzion/neon-js" "5.3.0" + "@cityofzion/neon-parser" "1.6.5" + "@cityofzion/neon-signer" "1.1.1" + "@cityofzion/wallet-connect-sdk-core" "2.5.4" "@walletconnect/sign-client" "2.7.3" "@walletconnect/types" "2.7.3" moment "^2.29.4" -"@cityofzion/wallet-connect-sdk-wallet-react@2.6.1": - version "2.6.1" - resolved "https://registry.yarnpkg.com/@cityofzion/wallet-connect-sdk-wallet-react/-/wallet-connect-sdk-wallet-react-2.6.1.tgz#286281cdd27f2bb85812792ee5fd66df0563884b" - integrity sha512-upTbu1aDiDzCxIVdI7u2NDsPg761bibqQ+taQz1SCsQ8e2JeZrGkQL9SY4E2Qa08E213fOwfR/ZiUarQOXjTWQ== +"@cityofzion/wallet-connect-sdk-wallet-react@2.5.4": + version "2.5.4" + resolved "https://registry.yarnpkg.com/@cityofzion/wallet-connect-sdk-wallet-react/-/wallet-connect-sdk-wallet-react-2.5.4.tgz#65e39a70ba263fe83ce763ff26e2dbee6cd488dc" + integrity sha512-ZMXpEEf6FgqqApOtAvP8eOmCT/1TPp+BO0tXLNxJC6NMcZ1MAWxO+m7ED0M9BKbSKAp06SO9JZfF17gEDCODYQ== dependencies: - "@cityofzion/wallet-connect-sdk-wallet-core" "2.6.1" + "@cityofzion/wallet-connect-sdk-wallet-core" "2.5.4" "@concordance/react@^1.0.0": version "1.0.0" @@ -6876,7 +6890,7 @@ crypto-js@4.0.0: resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.0.0.tgz#2904ab2677a9d042856a2ea2ef80de92e4a36dcc" integrity sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg== -crypto-js@4.1.1, crypto-js@^4.1.1: +crypto-js@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.1.1.tgz#9e485bcf03521041bd85844786b83fb7619736cf" integrity sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw== @@ -7921,7 +7935,7 @@ elliptic@6.4.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" -elliptic@6.5.4, elliptic@^6.5.3, elliptic@^6.5.4: +elliptic@6.5.4, elliptic@^6.5.3: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== From 9b28b298e94c11819d0d2c525e26fe4d9d583add Mon Sep 17 00:00:00 2001 From: Maxwell Lasky Date: Mon, 18 Sep 2023 16:54:58 -0600 Subject: [PATCH 9/9] Bump version to 2.20.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6c69f9d7f..a2cd225ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Neon", - "version": "2.20.5", + "version": "2.20.6", "main": "./main.js", "description": "Light wallet for NEO blockchain", "homepage": "https://github.com/CityOfZion/neon-wallet",