Skip to content

Commit

Permalink
Fix Identicon on-not-connected (polkadot-js#2070)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacogr authored and KarishmaBothara committed Feb 20, 2020
1 parent 1b36e30 commit 77c43a2
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 67 deletions.
2 changes: 1 addition & 1 deletion packages/app-accounts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-settings/src/General.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const availableLanguages: SetOption[] = [
];

function General ({ className, isModalContent, onClose, t }: Props): React.ReactElement<Props> {
// 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<boolean | null>(null);
const [settings, setSettings] = useState(uiSettings.get());

Expand Down
2 changes: 1 addition & 1 deletion packages/apps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
6 changes: 3 additions & 3 deletions packages/react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-components/src/IdentityIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export function getIdentityTheme (systemName: string): 'empty' {
}

function IdentityIcon ({ className, onCopy, prefix, size, style, t, theme, value }: Props): React.ReactElement<Props> {
const { api, systemName } = useApi();
const info = useCall<DeriveAccountInfo>(api.derive.accounts.info as any, [value]);
const { api, isApiReady, systemName } = useApi();
const info = useCall<DeriveAccountInfo>(isApiReady ? api.derive.accounts.info as any : undefined, [value]);
const { queueAction } = useContext(StatusContext);
const validators = useContext(ValidatorsContext);
const [isValidator, setIsValidator] = useState(false);
Expand Down
2 changes: 1 addition & 1 deletion packages/react-signer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
91 changes: 33 additions & 58 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2203,25 +2203,25 @@
"@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"
jdenticon "2.2.0"
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"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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==
Expand Down Expand Up @@ -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=
Expand Down Expand Up @@ -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==
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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==
Expand Down Expand Up @@ -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==
Expand Down Expand Up @@ -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==
Expand Down Expand Up @@ -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==
Expand Down

0 comments on commit 77c43a2

Please sign in to comment.