From 8aab9c3d6a38edc7fd6f0c6a203490f753131b90 Mon Sep 17 00:00:00 2001 From: Pierre Bertet Date: Tue, 26 Sep 2023 16:56:06 +0100 Subject: [PATCH] Move from ethereum-blockies-base64 to blo --- package.json | 2 +- src/components/EthHashInfo/Identicon.tsx | 4 ++-- yarn.lock | 17 +++++------------ 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index f35af9ff..81b3732d 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "license": "MIT", "dependencies": { "@ethersproject/address": "^5.7.0", - "ethereum-blockies-base64": "^1.0.2" + "blo": "^1.1.1" }, "devDependencies": { "@babel/core": "^7.20.7", diff --git a/src/components/EthHashInfo/Identicon.tsx b/src/components/EthHashInfo/Identicon.tsx index 1589be6c..1b2cea2b 100644 --- a/src/components/EthHashInfo/Identicon.tsx +++ b/src/components/EthHashInfo/Identicon.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import createIdenticon from 'ethereum-blockies-base64'; +import { blo } from 'blo'; import Skeleton from '@mui/material/Skeleton'; import { styled } from '@mui/material/styles'; @@ -14,7 +14,7 @@ const Identicon = ({ }: IdenticonProps): React.ReactElement => { const style = React.useMemo(() => { try { - const icon = createIdenticon(address); + const icon = blo(address as `0x${string}`); return { backgroundImage: `url(${icon})`, width: `${size}px`, diff --git a/yarn.lock b/yarn.lock index 15478c3b..ebd9460f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4242,6 +4242,11 @@ bindings@^1.5.0: dependencies: file-uri-to-path "1.0.0" +blo@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/blo/-/blo-1.1.1.tgz#ed781c5c516fba484ec8ec86105dc27f6c553209" + integrity sha512-1uGZInlRD4X1WQP2G1QjDGwGZ8HdGgFKqnzyRdA2TYYc0MOQCmCi37RTQ8oJuI0UF6DYFKXHwV/t1kZkO/fTaA== + bluebird@^3.5.5: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" @@ -6000,13 +6005,6 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== -ethereum-blockies-base64@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/ethereum-blockies-base64/-/ethereum-blockies-base64-1.0.2.tgz#4aebca52142bf4d16a3144e6e2b59303e39ed2b3" - integrity sha512-Vg2HTm7slcWNKaRhCUl/L3b4KrB8ohQXdd5Pu3OI897EcR6tVRvUqdTwAyx+dnmoDzj8e2bwBLDQ50ByFmcz6w== - dependencies: - pnglib "0.0.1" - events@^3.0.0, events@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" @@ -9693,11 +9691,6 @@ pkg-dir@^5.0.0: dependencies: find-up "^5.0.0" -pnglib@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/pnglib/-/pnglib-0.0.1.tgz#f9ab6f9c688f4a9d579ad8be28878a716e30c096" - integrity sha512-95ChzOoYLOPIyVmL+Y6X+abKGXUJlvOVLkB1QQkyXl7Uczc6FElUy/x01NS7r2GX6GRezloO/ecCX9h4U9KadA== - pnp-webpack-plugin@1.6.4: version "1.6.4" resolved "https://registry.yarnpkg.com/pnp-webpack-plugin/-/pnp-webpack-plugin-1.6.4.tgz#c9711ac4dc48a685dabafc86f8b6dd9f8df84149"