From e75270fd6282f04c4d4a4d5bfdcab920f8eed9a0 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 18 Dec 2019 12:31:55 +0100 Subject: [PATCH] Fix Identicon on-not-connected --- packages/app-accounts/package.json | 2 +- packages/app-settings/src/General.tsx | 2 +- packages/apps/package.json | 2 +- packages/react-components/package.json | 6 +- .../react-components/src/IdentityIcon.tsx | 4 +- packages/react-signer/package.json | 2 +- yarn.lock | 91 +++++++------------ 7 files changed, 42 insertions(+), 67 deletions(-) diff --git a/packages/app-accounts/package.json b/packages/app-accounts/package.json index 8dee725d7182..19da4e8ea499 100644 --- a/packages/app-accounts/package.json +++ b/packages/app-accounts/package.json @@ -12,7 +12,7 @@ "dependencies": { "@babel/runtime": "^7.7.5", "@polkadot/react-components": "^0.39.0-beta.15", - "@polkadot/react-qr": "^0.48.0-beta.4", + "@polkadot/react-qr": "^0.48.0-beta.5", "@types/file-saver": "^2.0.0", "@types/yargs": "^13.0.2", "babel-plugin-module-resolver": "^3.1.1", diff --git a/packages/app-settings/src/General.tsx b/packages/app-settings/src/General.tsx index ea671a9de832..4fa899a8efed 100644 --- a/packages/app-settings/src/General.tsx +++ b/packages/app-settings/src/General.tsx @@ -38,7 +38,7 @@ const availableLanguages: SetOption[] = [ ]; function General ({ className, isModalContent, onClose, t }: Props): React.ReactElement { - // tri-state: null = nothing changed, false = no reload, true = reload required + // tri-state: null = nothing changed, false = no reload, true = reload required const [changed, setChanged] = useState(null); const [settings, setSettings] = useState(uiSettings.get()); diff --git a/packages/apps/package.json b/packages/apps/package.json index a4b27355384f..4f2ca1d8f5c7 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -16,7 +16,7 @@ "@babel/runtime": "^7.7.5", "@polkadot/react-components": "^0.39.0-beta.15", "@polkadot/react-signer": "^0.39.0-beta.15", - "@polkadot/ui-assets": "^0.48.0-beta.4", + "@polkadot/ui-assets": "^0.48.0-beta.5", "query-string": "^6.8.3" } } diff --git a/packages/react-components/package.json b/packages/react-components/package.json index 5df4e58d9446..292b9cba2f3e 100644 --- a/packages/react-components/package.json +++ b/packages/react-components/package.json @@ -13,10 +13,10 @@ "@babel/runtime": "^7.7.6", "@polkadot/keyring": "^1.7.1", "@polkadot/react-api": "^0.39.0-beta.15", - "@polkadot/react-identicon": "^0.48.0-beta.4", + "@polkadot/react-identicon": "^0.48.0-beta.5", "@polkadot/react-query": "^0.39.0-beta.15", - "@polkadot/ui-keyring": "^0.48.0-beta.4", - "@polkadot/ui-settings": "^0.48.0-beta.4", + "@polkadot/ui-keyring": "^0.48.0-beta.5", + "@polkadot/ui-settings": "^0.48.0-beta.5", "@types/chart.js": "^2.8.10", "@types/i18next": "^13.0.0", "@types/react-copy-to-clipboard": "^4.3.0", diff --git a/packages/react-components/src/IdentityIcon.tsx b/packages/react-components/src/IdentityIcon.tsx index 94a366e90a08..5b45b01ec7a2 100644 --- a/packages/react-components/src/IdentityIcon.tsx +++ b/packages/react-components/src/IdentityIcon.tsx @@ -33,8 +33,8 @@ export function getIdentityTheme (systemName: string): 'empty' { } function IdentityIcon ({ className, onCopy, prefix, size, style, t, theme, value }: Props): React.ReactElement { - const { api, systemName } = useApi(); - const info = useCall(api.derive.accounts.info as any, [value]); + const { api, isApiReady, systemName } = useApi(); + const info = useCall(isApiReady ? api.derive.accounts.info as any : undefined, [value]); const { queueAction } = useContext(StatusContext); const validators = useContext(ValidatorsContext); const [isValidator, setIsValidator] = useState(false); diff --git a/packages/react-signer/package.json b/packages/react-signer/package.json index 07ea822e5881..6c2fc2d93c56 100644 --- a/packages/react-signer/package.json +++ b/packages/react-signer/package.json @@ -12,6 +12,6 @@ "dependencies": { "@babel/runtime": "^7.7.5", "@polkadot/react-components": "^0.39.0-beta.15", - "@polkadot/react-qr": "^0.48.0-beta.4" + "@polkadot/react-qr": "^0.48.0-beta.5" } } diff --git a/yarn.lock b/yarn.lock index 0cff4242c0a3..3a394a2174ec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2203,14 +2203,14 @@ "@polkadot/util" "^1.7.1" "@polkadot/util-crypto" "^1.7.1" -"@polkadot/react-identicon@^0.48.0-beta.4": - version "0.48.0-beta.4" - resolved "https://registry.yarnpkg.com/@polkadot/react-identicon/-/react-identicon-0.48.0-beta.4.tgz#c56720b84727e49c2a9f3020cee66e1d050e0c37" - integrity sha512-uvTT1E5T/p/1rLqR8qwiNtZU91NLAYfblzNHHud+ifSR7JBe1wMbJxaeaOes5MNfUafxE/Dugq2GIgBLBH0K9w== +"@polkadot/react-identicon@^0.48.0-beta.5": + version "0.48.0-beta.5" + resolved "https://registry.npmjs.org/@polkadot/react-identicon/-/react-identicon-0.48.0-beta.5.tgz#c2aa83447c4c5af8f8e70f336fe1a8f6b973e26b" + integrity sha512-TFGgGeUOOvFLrJTZXsoMJp6l7CJrd7z/OmdLZvFMnO44F34vdWgbfsPbpD3XIrBcvj3IUJD2d0/lTr6GvqtATQ== dependencies: "@babel/runtime" "^7.7.5" - "@polkadot/ui-settings" "^0.48.0-beta.4" - "@polkadot/ui-shared" "^0.48.0-beta.4" + "@polkadot/ui-settings" "^0.48.0-beta.5" + "@polkadot/ui-shared" "^0.48.0-beta.5" "@types/color" "^3.0.0" "@types/react-copy-to-clipboard" "^4.3.0" color "^3.1.2" @@ -2218,10 +2218,10 @@ react-copy-to-clipboard "^5.0.2" styled-components "^4.4.1" -"@polkadot/react-qr@^0.48.0-beta.4": - version "0.48.0-beta.4" - resolved "https://registry.yarnpkg.com/@polkadot/react-qr/-/react-qr-0.48.0-beta.4.tgz#9818be4d81bf61cbef7479105b796929dcd93a57" - integrity sha512-fAUwJHZMAOtkn5x1H0VGfE6cOsMAv38xwn+Bo/OvV6nWQsfadC7ozWNsGUFMDWOOdue2b4z4TJ4WBFESU3u+LQ== +"@polkadot/react-qr@^0.48.0-beta.5": + version "0.48.0-beta.5" + resolved "https://registry.npmjs.org/@polkadot/react-qr/-/react-qr-0.48.0-beta.5.tgz#e52be8d7b4cd3fffb00eb61c0504d68fcf53bc23" + integrity sha512-jS3jXFxaG5+TOGQay3IizJbZJUUx+2bq1oPme/MIaIFN/maM5qov4mz2GtyXMQ4M7Eldu1+JJg3qzUdFXzcTSA== dependencies: "@babel/runtime" "^7.7.5" "@types/react-qr-reader" "^2.1.1" @@ -2272,17 +2272,17 @@ "@types/memoizee" "^0.4.3" memoizee "^0.4.14" -"@polkadot/ui-assets@^0.48.0-beta.4": - version "0.48.0-beta.4" - resolved "https://registry.yarnpkg.com/@polkadot/ui-assets/-/ui-assets-0.48.0-beta.4.tgz#ce16fc9638f76c6bff4d0752562fcc1e14759424" - integrity sha512-GZLl8bx9QYA1Sw09BgPYVn5ZX/WAikg+Ys6kf2nkCpJBDYHktv2GWdZjAmY5sVJb3ymomInzgZgcEn24fSx2hw== +"@polkadot/ui-assets@^0.48.0-beta.5": + version "0.48.0-beta.5" + resolved "https://registry.npmjs.org/@polkadot/ui-assets/-/ui-assets-0.48.0-beta.5.tgz#b1bea6673a0311ac048ff59fc0f3ea85146ca989" + integrity sha512-82q4H3GJFgnP1zqIwPrz7TGBsWsZGuX7SpDZOOxuxfZGID5eOH1sWd8q9H/kea4IMsy5Aj35cNzECnTC6ZfFYA== dependencies: "@babel/runtime" "^7.7.5" -"@polkadot/ui-keyring@^0.48.0-beta.4": - version "0.48.0-beta.4" - resolved "https://registry.yarnpkg.com/@polkadot/ui-keyring/-/ui-keyring-0.48.0-beta.4.tgz#3d1da265506fbb8d8699cf70ac62719d9ca5ec27" - integrity sha512-MGsEFLUK07DhdCs4D47GdYUMCgt+yqhLzWFU7hze1BwyAg0L2o8dctW/ovOQQdNo8aoo7tRLGGba6rZc7geMTQ== +"@polkadot/ui-keyring@^0.48.0-beta.5": + version "0.48.0-beta.5" + resolved "https://registry.npmjs.org/@polkadot/ui-keyring/-/ui-keyring-0.48.0-beta.5.tgz#44b68f9ec4001e968664c6d50b6a49164b1852ba" + integrity sha512-Si2Wwdn66MMbGCn7+Wkj0nuYVmxkaLyV7yvvNz9EYlC2NGrfkQQENpWw2EODFw1uGkL/TYqUqsFbYslWGvA8hQ== dependencies: "@babel/runtime" "^7.7.5" "@ledgerhq/hw-transport-u2f" "^4.73.7" @@ -2298,19 +2298,19 @@ optionalDependencies: "@ledgerhq/hw-transport-node-hid" "^4.73.7" -"@polkadot/ui-settings@^0.48.0-beta.4": - version "0.48.0-beta.4" - resolved "https://registry.yarnpkg.com/@polkadot/ui-settings/-/ui-settings-0.48.0-beta.4.tgz#1595349ced01a2188d853547fe2cc217fd41533f" - integrity sha512-n465576E6FOB9U6ET6AUqiE54TyRS8YFZ6s05k2x0bqkzC+Sab/PXJesGj6lrPTp2j7Jiua1e3GE0rT+tPH8Lg== +"@polkadot/ui-settings@^0.48.0-beta.5": + version "0.48.0-beta.5" + resolved "https://registry.npmjs.org/@polkadot/ui-settings/-/ui-settings-0.48.0-beta.5.tgz#76b527280e8cc72ae1e27b907d592e50d52cbee8" + integrity sha512-z9Ce4cLUCw+677Ii5cGAITBAHBecoq1GarR7PkBI8iJRb4g57dYbPL7Z2rY2tJponlr2RAi+nfg9LtyRzZGRTA== dependencies: "@babel/runtime" "^7.7.5" "@types/store" "^2.0.2" store "^2.0.12" -"@polkadot/ui-shared@^0.48.0-beta.4": - version "0.48.0-beta.4" - resolved "https://registry.yarnpkg.com/@polkadot/ui-shared/-/ui-shared-0.48.0-beta.4.tgz#7b5d019260f8c38c75e2c07bd490d49f4b327fa7" - integrity sha512-6i9pcd0UT/kJLqIK8+HoGzuHojLDjMMNpbU61oscRVIyXVqHYSznJ4YffrWD7/TWWadei6iuvWvp4mohv1TJPQ== +"@polkadot/ui-shared@^0.48.0-beta.5": + version "0.48.0-beta.5" + resolved "https://registry.npmjs.org/@polkadot/ui-shared/-/ui-shared-0.48.0-beta.5.tgz#fbf0296acf7e5352cb24d1d40a4c95ffd35636c9" + integrity sha512-p8WKznbyJpbCRlgsN4YN2TtVrd+dSRtwCRa48u3lrA4h2HnDttQwIBYubW6H0cfU7v7YcI0q1H7gi4p6W/q30g== dependencies: "@babel/runtime" "^7.7.5" "@types/color" "^3.0.0" @@ -5553,7 +5553,7 @@ debug@3.1.0, debug@~3.1.0: dependencies: ms "2.0.0" -debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: +debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -5776,7 +5776,7 @@ detect-indent@^5.0.0: resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= -detect-libc@^1.0.2, detect-libc@^1.0.3: +detect-libc@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= @@ -8321,7 +8321,7 @@ i18next@*, i18next@^19.0.0: dependencies: "@babel/runtime" "^7.3.1" -iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@^0.4.5, iconv-lite@~0.4.13: +iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.5, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -10916,15 +10916,6 @@ nearley@^2.7.10: randexp "0.4.6" semver "^5.4.1" -needle@^2.2.1: - version "2.4.0" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c" - integrity sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg== - dependencies: - debug "^3.2.6" - iconv-lite "^0.4.4" - sax "^1.2.4" - negotiator@0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" @@ -11062,22 +11053,6 @@ node-notifier@^5.4.2: shellwords "^0.1.1" which "^1.3.0" -node-pre-gyp@*: - version "0.14.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83" - integrity sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4.4.2" - node-releases@^1.1.42: version "1.1.42" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.42.tgz#a999f6a62f8746981f6da90627a8d2fc090bbad7" @@ -11206,7 +11181,7 @@ npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1: semver "^5.6.0" validate-npm-package-name "^3.0.0" -npm-packlist@^1.1.6, npm-packlist@^1.4.4: +npm-packlist@^1.4.4: version "1.4.7" resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.7.tgz#9e954365a06b80b18111ea900945af4f88ed4848" integrity sha512-vAj7dIkp5NhieaGZxBJB8fF4R0078rqsmhJcAfXZ6O7JJhjhPK96n5Ry1oZcfLXgfun0GWTZPOxaEyqv8GBykQ== @@ -11237,7 +11212,7 @@ npm-run-path@^4.0.0: dependencies: path-key "^3.0.0" -npmlog@^4.0.1, npmlog@^4.0.2, npmlog@^4.1.2: +npmlog@^4.0.1, npmlog@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== @@ -13969,7 +13944,7 @@ rimraf@2.6.3, rimraf@~2.6.2: dependencies: glob "^7.1.3" -rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -15149,7 +15124,7 @@ tar-stream@^2.0.0: inherits "^2.0.3" readable-stream "^3.1.1" -tar@^4.4.10, tar@^4.4.12, tar@^4.4.2, tar@^4.4.8: +tar@^4.4.10, tar@^4.4.12, tar@^4.4.8: version "4.4.13" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==