mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(SettingsModal): force keep the same account id when saving to allow faster account import
This commit is contained in:
@@ -338,7 +338,8 @@ const SettingsModal = ({ isOpen, closeModal }) => {
|
|||||||
const oldData = accountJson;
|
const oldData = accountJson;
|
||||||
try {
|
try {
|
||||||
const parsedJson = JSON.parse(data);
|
const parsedJson = JSON.parse(data);
|
||||||
await setAccount(parsedJson.account);
|
const newAccount = parsedJson.account;
|
||||||
|
await setAccount({ ...newAccount, id: account?.id });
|
||||||
|
|
||||||
if (!oldData.account?.author?.address.endsWith('.eth') && parsedJson.account?.author?.address.endsWith('.eth') && anonymousMode === true) {
|
if (!oldData.account?.author?.address.endsWith('.eth') && parsedJson.account?.author?.address.endsWith('.eth') && anonymousMode === true) {
|
||||||
setAnonymousMode(false);
|
setAnonymousMode(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user