Skip to content

Commit

Permalink
Merge pull request #3738 from Emurgo/fix/YOEXT-1524/connector-sign-re…
Browse files Browse the repository at this point in the history
…turn-reject

connector returns user reject when user closes signing popup
  • Loading branch information
vsubhuman authored Nov 14, 2024
2 parents d5e95bb + a0d9123 commit 3ff9767
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ export default class SignTxContainer extends Component<
// will throw a WrongPasswordError if password is wrong
await getPrivateStakingKey({ publicDeriverId: deriver.publicDeriverId, password });
}
await this.props.actions.connector.confirmSignInTx.trigger(password);
window.removeEventListener('beforeunload', this.onUnload);
window.removeEventListener('unload', this.onUnload);

await this.props.actions.connector.confirmSignInTx.trigger(password);
window.close();
};
onCancel: () => void = () => {
window.removeEventListener('beforeunload', this.onUnload);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ export default class ConnectorStore extends Store<StoresMap, ActionsMap> {

this.actions.connector.cancelSignInTx.remove(this._cancelSignInTx);
await ampli.dappPopupSignTransactionSubmitted();
this._closeWindow();
};
@action
_cancelSignInTx: void => void = () => {
Expand Down

0 comments on commit 3ff9767

Please sign in to comment.