Fix shadow-variable errors in EncryptionPanel

pull/21833/head
Swapnil Raj 2020-07-18 23:55:28 +05:30
parent 0f0b4035b7
commit 8ae11ce886
1 changed files with 6 additions and 6 deletions

View File

@ -59,10 +59,10 @@ const EncryptionPanel: React.FC<IProps> = (props: IProps) => {
useEffect(() => { useEffect(() => {
async function awaitPromise() { async function awaitPromise() {
setRequesting(true); setRequesting(true);
const request = await verificationRequestPromise; const requestFromPromise = await verificationRequestPromise;
setRequesting(false); setRequesting(false);
setRequest(request); setRequest(requestFromPromise);
setPhase(request.phase); setPhase(requestFromPromise.phase);
} }
if (verificationRequestPromise) { if (verificationRequestPromise) {
awaitPromise(); awaitPromise();
@ -115,9 +115,9 @@ const EncryptionPanel: React.FC<IProps> = (props: IProps) => {
setRequesting(true); setRequesting(true);
const cli = MatrixClientPeg.get(); const cli = MatrixClientPeg.get();
const roomId = await ensureDMExists(cli, member.userId); const roomId = await ensureDMExists(cli, member.userId);
const verificationRequest = await cli.requestVerificationDM(member.userId, roomId); const verificationRequest_ = await cli.requestVerificationDM(member.userId, roomId);
setRequest(verificationRequest); setRequest(verificationRequest_);
setPhase(verificationRequest.phase); setPhase(verificationRequest_.phase);
}, [member.userId]); }, [member.userId]);
const requested = const requested =