We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c4096d commit 404a1d3Copy full SHA for 404a1d3
1 file changed
src/components/Identicon.tsx
@@ -1,5 +1,4 @@
1
import jazzicon from '@metamask/jazzicon'
2
-import { BigNumber } from 'ethers'
3
import { PureComponent } from 'react'
4
import { Styles } from 'src/styles/types'
5
import { isValidAddress, normalizeAddress } from 'src/utils/addresses'
@@ -10,8 +9,10 @@ type Props = {
10
9
styles?: Styles
11
}
12
+// This should match metamask: https://github.com/MetaMask/metamask-extension/blob/master/ui/helpers/utils/icon-factory.js#L84
13
function addressToSeed(address: string) {
14
- return BigNumber.from(normalizeAddress(address).slice(0, 8)).toNumber()
+ const addrStub = normalizeAddress(address).slice(2, 10)
15
+ return parseInt(addrStub, 16)
16
17
18
export class Identicon extends PureComponent<Props> {
0 commit comments