mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(reply modal): changing anon mode before publishing reply didn't work
This commit is contained in:
@@ -30,15 +30,17 @@ const usePublishReply = ({ cid, subplebbitAddress, postCid }: { cid: string; sub
|
||||
spoiler,
|
||||
};
|
||||
|
||||
const authorOptions = {
|
||||
displayName: author?.displayName,
|
||||
address: anonMode ? signer?.address : account?.author?.address,
|
||||
};
|
||||
|
||||
baseOptions.author = authorOptions;
|
||||
|
||||
if (anonMode) {
|
||||
baseOptions.author = {
|
||||
address: signer?.address,
|
||||
displayName: author?.displayName,
|
||||
};
|
||||
baseOptions.signer = signer;
|
||||
} else {
|
||||
baseOptions.author = {
|
||||
...account?.author,
|
||||
displayName: author?.displayName || account?.author?.displayName,
|
||||
};
|
||||
}
|
||||
|
||||
return baseOptions;
|
||||
|
||||
Reference in New Issue
Block a user