Skip to content

Commit

Permalink
change disconnect to not reset provider
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveMieskoski committed Jan 21, 2021
1 parent a0be83c commit 575dca3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### Release 2.1.21-beta.1
- Change disconnect with in app browser to not reset environment

### Release 2.1.20
- Detect in-app browser and default to use it.
- Don't redirect to open app on IOS
Expand Down
3 changes: 3 additions & 0 deletions example/app/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -876,12 +876,15 @@ export default {
try {
const msg = '1234';
if (this.signatureToCheck === '' && this.signatureFromMessage === '') {
console.log( 'lklklklk', this.signatureFromMessage,
this.userAddress); // todo remove dev item
this.signatureFromMessage = '1234';
this.signatureToCheck = await this.web3.eth.personal.sign(
this.signatureFromMessage,
this.userAddress
);
}
console.log('toCheck', this.signatureToCheck); // todo remove dev item
const res = this.web3.eth.personal
.ecRecover(
this.signatureFromMessage,
Expand Down
2 changes: 1 addition & 1 deletion package-lock.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.20",
"version": "2.1.21-beta.1",
"main": "./dist/index.js",
"module": "./src/index.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/connectClient/initiator/MewConnectInitiatorV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ export default class MewConnectInitiatorV2 extends MewConnectCommon {
this.useFallback();
} else if (!this.connected && this.tryingTurn && !this.turnDisabled) {
this.emit('ShowReload');
console.log('SHOW RELOAD'); // todo remove dev item
}
else {
if (!this.isAlive()) {
Expand Down
3 changes: 3 additions & 0 deletions src/connectProvider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,9 @@ export default class Integration extends EventEmitter {

disconnect() {
try {
if(this.runningInApp){
return true;
}
if (state.wallet) {
const connection = state.wallet.getConnection();
connection.disconnectRTC();
Expand Down

0 comments on commit 575dca3

Please sign in to comment.