Skip to content

Commit

Permalink
fix: edit account issue
Browse files Browse the repository at this point in the history
  • Loading branch information
danwag06 committed Dec 20, 2024
1 parent 08d429f commit 2418f88
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pages/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,12 @@ export const Settings = () => {
};

const handleAccountEditSave = async () => {
const { account } = chromeStorageService.getCurrentAccountObject();
if (!account) return;
const accounts = chromeStorageService.getAllAccounts();
const account = accounts.find((acc) => acc.addresses.identityAddress === selectedAccountIdentityAddress);
if (!account || !selectedAccountIdentityAddress) return;
const key: keyof ChromeStorageObject = 'accounts';
const update: Partial<ChromeStorageObject['accounts']> = {
[account?.addresses.identityAddress]: {
[selectedAccountIdentityAddress]: {
...account,
name: enteredAccountName,
icon: enteredAccountIcon,
Expand Down

0 comments on commit 2418f88

Please sign in to comment.