Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
() => {
const status = {
account: current.address(),
action: 'forget'
} as ActionStatus;
try {
keyring.forgetAddress(
current.address()
);
status.status = 'success';
status.message = t('address forgotten');
} catch (error) {
status.status = 'error';
status.message = error.message;
}
onStatusChange(status);
}
);
const _onForget = (): void => {
if (address) {
const status: Partial = {
account: address,
action: 'forget'
};
try {
keyring.forgetAddress(address);
status.status = 'success';
status.message = t('address forgotten');
} catch (error) {
status.status = 'error';
status.message = error.message;
}
}
};
const _onGenesisChange = (genesisHash: string | null): void => {