+ for key in account_config.keys():
+ if key== 'user_private_key':
+ del account_config[key]
+
+ updated_config = json.dumps(account_config)
+ user_params = { 'config': updated_config, 'auth_type':'user'}
+ manifold_update_account(request,user_params)
+ messages.success(request, 'Private Key deleted. You need to delegate credentials manually once it expires.')
+ return HttpResponseRedirect("/portal/account/")