Skip to content

Commit

Permalink
emit error when closing via cancel as well, bump version to 2.1.0-RC.5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveMieskoski committed Jul 8, 2020
1 parent ef43c07 commit 3f0e66b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### Release v2.1.0-RC.5.8
- Emit error when popup is closed via closing the window or clicking cancel

### Release v2.1.0-RC.5.7
- Add option to emit error when popup is closed
- Design modifications

### Release v2.1.0-RC.5.4
- Remove refreshing QRcode.
- better error handling between V1 and V2 connection types
Expand Down
3 changes: 2 additions & 1 deletion example/app/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export default {
mounted() {
// Initialize the provider based client
this.connect = new mewConnect.Provider({windowClosedError: true});
// this.connect = new mewConnect.Provider();
// Create the MEWconnect web3 provider
this.ethereum = this.connect.makeWeb3Provider(1)
// Create a web3 instance using the MEWconnect web3 provider
Expand Down Expand Up @@ -212,7 +213,7 @@ export default {
console.log(`User's address is ${accounts[0]}`);
this.userAddress = accounts[0];
})
.catch(console.log)
.catch(console.error)
},
disconnect() {
this.connect.disconnect();
Expand Down
2 changes: 1 addition & 1 deletion npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@myetherwallet/mewconnect-web-client",
"homepage": "https://github.com/myetherwallet/MEWconnect-web-client",
"version": "2.1.0-RC.5.7",
"version": "2.1.0-RC.5.8",
"main": "./dist/index.js",
"module": "./src/index.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/connectWindow/popUpCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ export default class PopUpCreator {

const cancelButton = document.getElementById('NotificationButton2');
cancelButton.addEventListener('click', () => {
this.removeWindowClosedListener();
this.popupWindowOpen = false;
this.hideNotifier();
this.windowClosedListener();
this.closePopupWindow();
});
}
Expand Down Expand Up @@ -174,6 +174,7 @@ export default class PopUpCreator {
this.popupUrl = null;
this.popupWindow = null;
}
this.removeWindowClosedListener();
window.focus();
}

Expand Down

0 comments on commit 3f0e66b

Please sign in to comment.