From 80278ce754d69e577bc873b5a0a00ad7dd36480c Mon Sep 17 00:00:00 2001 From: Dylan Jeffers Date: Thu, 4 May 2023 16:28:19 -0700 Subject: [PATCH] Upgrade sdk to beta.16, update install script (#3339) --- package.json | 2 +- packages/common/package-lock.json | 12 +-- packages/common/package.json | 2 +- packages/mobile/package-lock.json | 86 +++++++++---------- packages/mobile/package.json | 2 +- packages/mobile/src/services/audius-sdk.ts | 6 ++ packages/web/package-lock.json | 6 +- packages/web/package.json | 2 +- .../web/src/services/audius-sdk/audiusSdk.ts | 7 ++ 9 files changed, 69 insertions(+), 56 deletions(-) diff --git a/package.json b/package.json index 63428d6b2c2..fc6a3743802 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "STEMS======================================": "", "stems": "cd packages/stems && npm run start", "SDK========================================": "", - "sdk:update": "lerna exec -- npm-check-updates @audius/sdk -u && npm i", + "sdk:update": "lerna exec -- npm-check-updates @audius/sdk -u && rm -rf packages/*/node_modules/@audius/sdk && npm i", "sdk:link": "./scripts/link-sdk.sh" }, "devDependencies": { diff --git a/packages/common/package-lock.json b/packages/common/package-lock.json index 3be253cbe00..291a3cf5cce 100644 --- a/packages/common/package-lock.json +++ b/packages/common/package-lock.json @@ -33,9 +33,9 @@ } }, "@audius/sdk": { - "version": "2.0.3-beta.14", - "resolved": "https://registry.npmjs.org/@audius/sdk/-/sdk-2.0.3-beta.14.tgz", - "integrity": "sha512-iFm+i1EmBCAtJ1urA10w6D2jgtnL0Kc4bgpmWDoDvJ5EZ9BdhL3Ke6QwZU2OgUT6fvAU4FOAP2FyFgoFKhdN5g==", + "version": "2.0.3-beta.16", + "resolved": "https://registry.npmjs.org/@audius/sdk/-/sdk-2.0.3-beta.16.tgz", + "integrity": "sha512-pdtaVihik6JWGe5X+mq/TIjhQA/GNwLcR49GCfJ911fgZZsVlFzEnTP9Nn0nRm76p1oq5RzXO/4OiyXORvaCwg==", "requires": { "@audius/hedgehog": "2.1.0", "@babel/runtime": "7.18.3", @@ -305,9 +305,9 @@ } }, "@babel/parser": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.5.tgz", - "integrity": "sha512-J+IxH2IsxV4HbnTrSWgMAQj0UEo61hDA4Ny8h8PCX0MLXiibqHbqIOVneqdocemSBc22VpBKxt4J6FQzy9HarQ==" + "version": "7.21.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.8.tgz", + "integrity": "sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA==" }, "@babel/runtime": { "version": "7.18.9", diff --git a/packages/common/package.json b/packages/common/package.json index f16993165c9..59ea54ce811 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -28,7 +28,7 @@ "url": "https://github.com/AudiusProject/audius-client/issues" }, "dependencies": { - "@audius/sdk": "2.0.3-beta.14", + "@audius/sdk": "2.0.3-beta.16", "@fingerprintjs/fingerprintjs-pro": "3.5.6", "@metaplex-foundation/mpl-token-metadata": "2.5.2", "@optimizely/optimizely-sdk": "4.0.0", diff --git a/packages/mobile/package-lock.json b/packages/mobile/package-lock.json index d1578b94c87..01557247f9e 100644 --- a/packages/mobile/package-lock.json +++ b/packages/mobile/package-lock.json @@ -73,9 +73,9 @@ } }, "@audius/sdk": { - "version": "2.0.3-beta.14", - "resolved": "https://registry.npmjs.org/@audius/sdk/-/sdk-2.0.3-beta.14.tgz", - "integrity": "sha512-iFm+i1EmBCAtJ1urA10w6D2jgtnL0Kc4bgpmWDoDvJ5EZ9BdhL3Ke6QwZU2OgUT6fvAU4FOAP2FyFgoFKhdN5g==", + "version": "2.0.3-beta.16", + "resolved": "https://registry.npmjs.org/@audius/sdk/-/sdk-2.0.3-beta.16.tgz", + "integrity": "sha512-pdtaVihik6JWGe5X+mq/TIjhQA/GNwLcR49GCfJ911fgZZsVlFzEnTP9Nn0nRm76p1oq5RzXO/4OiyXORvaCwg==", "requires": { "@audius/hedgehog": "2.1.0", "@babel/runtime": "7.18.3", @@ -10278,7 +10278,7 @@ "@walletconnect/utils": "^1.8.0", "keyvaluestorage": "0.7.1", "react-native-qrcode-svg": "6.0.6", - "react-native-svg": "12.3.0", + "react-native-svg": "9.6.4", "use-deep-compare-effect": "1.6.1" }, "dependencies": { @@ -27059,6 +27059,32 @@ "css-tree": "^1.0.0-alpha.39" }, "dependencies": { + "css-select": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", + "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", + "requires": { + "boolbase": "^1.0.0", + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + } + }, + "css-tree": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "requires": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + } + }, + "css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==" + }, "dom-serializer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", @@ -27069,10 +27095,10 @@ "entities": "^2.0.0" } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==" }, "domutils": { "version": "2.8.0", @@ -27084,36 +27110,10 @@ "domhandler": "^4.2.0" } }, - "domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==" - }, - "css-select": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", - "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", - "requires": { - "boolbase": "^1.0.0", - "css-what": "^6.0.1", - "domhandler": "^4.3.1", - "domutils": "^2.8.0", - "nth-check": "^2.0.1" - } - }, - "css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==" - }, - "css-tree": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", - "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", - "requires": { - "mdn-data": "2.0.14", - "source-map": "^0.6.1" - } + "mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==" }, "nth-check": { "version": "2.1.1", @@ -27123,10 +27123,10 @@ "boolbase": "^1.0.0" } }, - "mdn-data": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", - "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==" + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, @@ -31761,4 +31761,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/mobile/package.json b/packages/mobile/package.json index f35bd08526a..6bc042dc016 100644 --- a/packages/mobile/package.json +++ b/packages/mobile/package.json @@ -44,7 +44,7 @@ "dependencies": { "@amplitude/react-native": "2.6.0", "@audius/common": "1.5.22", - "@audius/sdk": "2.0.3-beta.14", + "@audius/sdk": "2.0.3-beta.16", "@fingerprintjs/fingerprintjs-pro-react-native": "2.0.0-test.2", "@gorhom/portal": "1.0.9", "@hcaptcha/react-native-hcaptcha": "1.3.4", diff --git a/packages/mobile/src/services/audius-sdk.ts b/packages/mobile/src/services/audius-sdk.ts index 85c34863a2a..da8f2e4dacf 100644 --- a/packages/mobile/src/services/audius-sdk.ts +++ b/packages/mobile/src/services/audius-sdk.ts @@ -40,6 +40,12 @@ const initSdk = async () => { publicKey, true ) + }, + getAddress: async () => { + await waitForLibsInit() + return ( + audiusLibs?.hedgehog?.getWallet()?.getAddress().toString() ?? '' + ) } } } diff --git a/packages/web/package-lock.json b/packages/web/package-lock.json index 450b20766ab..f456312d5fa 100644 --- a/packages/web/package-lock.json +++ b/packages/web/package-lock.json @@ -121,9 +121,9 @@ } }, "@audius/sdk": { - "version": "2.0.3-beta.14", - "resolved": "https://registry.npmjs.org/@audius/sdk/-/sdk-2.0.3-beta.14.tgz", - "integrity": "sha512-iFm+i1EmBCAtJ1urA10w6D2jgtnL0Kc4bgpmWDoDvJ5EZ9BdhL3Ke6QwZU2OgUT6fvAU4FOAP2FyFgoFKhdN5g==", + "version": "2.0.3-beta.16", + "resolved": "https://registry.npmjs.org/@audius/sdk/-/sdk-2.0.3-beta.16.tgz", + "integrity": "sha512-pdtaVihik6JWGe5X+mq/TIjhQA/GNwLcR49GCfJ911fgZZsVlFzEnTP9Nn0nRm76p1oq5RzXO/4OiyXORvaCwg==", "requires": { "@audius/hedgehog": "2.1.0", "@babel/runtime": "7.18.3", diff --git a/packages/web/package.json b/packages/web/package.json index 71cb6b1a5d4..581638ee4dc 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -52,7 +52,7 @@ }, "dependencies": { "@audius/common": "1.5.22", - "@audius/sdk": "2.0.3-beta.14", + "@audius/sdk": "2.0.3-beta.16", "@audius/stems": "1.5.22", "@coinbase/cbpay-js": "1.2.0", "@craco/craco": "7.0.0-alpha.3", diff --git a/packages/web/src/services/audius-sdk/audiusSdk.ts b/packages/web/src/services/audius-sdk/audiusSdk.ts index 5e945705f1e..677228d49ab 100644 --- a/packages/web/src/services/audius-sdk/audiusSdk.ts +++ b/packages/web/src/services/audius-sdk/audiusSdk.ts @@ -41,6 +41,13 @@ const initSdk = async () => { publicKey, true ) + }, + getAddress: async () => { + await waitForLibsInit() + return ( + window.audiusLibs?.hedgehog?.getWallet()?.getAddress().toString() ?? + '' + ) } } }