Fix shadow-variable errors in EncryptionPanel
parent
0f0b4035b7
commit
8ae11ce886
|
@ -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 =
|
||||||
|
|
Loading…
Reference in New Issue