[xc-admin] frontend update permissions bugfix (#528)
* fix bug where setting new pubkey and reverting the change doesnt reflect properly * fix bug where switching to cluster with permissionAccount and switching back doesnt show default value * remove console.log
This commit is contained in:
parent
2c6eb7d1e3
commit
fe3816f69a
|
@ -139,6 +139,8 @@ const UpdatePermissions = () => {
|
|||
pubkey: securityAuthority,
|
||||
},
|
||||
])
|
||||
} else {
|
||||
setData([...DEFAULT_DATA])
|
||||
}
|
||||
}, [rawConfig])
|
||||
|
||||
|
@ -228,6 +230,12 @@ const UpdatePermissions = () => {
|
|||
new: newPubkey,
|
||||
},
|
||||
})
|
||||
} else {
|
||||
// delete account from pubkeyChanges if it exists
|
||||
if (pubkeyChanges && pubkeyChanges[account]) {
|
||||
delete pubkeyChanges[account]
|
||||
}
|
||||
setPubkeyChanges(pubkeyChanges)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue