Skip to content

Commit 0c779bf

Browse files
committed
fix(settings): crypto wallet signature shouldnt include wallet address, only plebbit author address
1 parent f55f8ca commit 0c779bf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/views/settings/crypto-wallets/crypto-wallets.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import {useState} from 'react'
22
import {useAccount, setAccount} from '@plebbit/plebbit-react-hooks'
33

4-
const getWalletMessageToSign = (authorAddress, timestamp, address) => {
4+
const getWalletMessageToSign = (authorAddress, timestamp) => {
55
let messageToSign = {}
66
// the property names must be in this order for the signature to match
77
// insert props one at a time otherwise babel/webpack will reorder
88
messageToSign.domainSeparator = 'plebbit-author-wallet'
99
messageToSign.authorAddress = authorAddress
1010
messageToSign.timestamp = timestamp
11-
messageToSign.address = address
1211
// use plain JSON so the user can read what he's signing
1312
messageToSign = JSON.stringify(messageToSign)
1413
return messageToSign
@@ -49,7 +48,7 @@ const CryptoWalletsForm = ({account}) => {
4948
return alert('missing address')
5049
}
5150
const timestamp = wallet.timestamp || Math.floor(Date.now() / 1000)
52-
const messageToSign = getWalletMessageToSign(authorAddress, timestamp, wallet.address)
51+
const messageToSign = getWalletMessageToSign(authorAddress, timestamp)
5352

5453
// if timestamp changed, update it so it gets saved properly
5554
if (timestamp !== wallet.timestamp) {

0 commit comments

Comments
 (0)