Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devop: enkrypt-marketing #183

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 27 additions & 21 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
- ### Release 2.2.0-beta.14
- UI
- ### Release 2.2.0-beta.19
- Fix ui hang up

- ### Release 2.2.0-beta.12
- add eth_signTypedData_v4
* ### Release 2.2.0-beta.17
* Add update for Enkrypt

- ### Release 2.2.0-beta.11
- return all lowercase address strings, fix npm resolution
* ### Release 2.2.0-beta.14
* UI

- ### Release 2.2.0-beta.10
- Fix github issues, npm audit fix
* ### Release 2.2.0-beta.12
* add eth_signTypedData_v4

- ### Release 2.2.0-beta.9
- add more networks
* ### Release 2.2.0-beta.11
* return all lowercase address strings, fix npm resolution

- ### Release 2.2.0-beta.6
- update rollup and more cleanup
* ### Release 2.2.0-beta.10
* Fix github issues, npm audit fix

- ### Release 2.2.0-beta.4
- cleanup and rollup updates
* ### Release 2.2.0-beta.9
* add more networks

- ### Release 2.2.0-beta.3
- change eth_decrypt, eth_getEncryptionPublicKey adhere to the standard
* ### Release 2.2.0-beta.6
* update rollup and more cleanup

- ### Release 2.2.0-beta.2
- Fix reference to css background class names in popUpCreator
- Fix typo with transaction receipt event
- Add eth_decrypt, eth_getEncryptionPublicKey, and eth_signtypeData_v3 methods
- Remove infuraid, always use rpcURL
* ### Release 2.2.0-beta.4
* cleanup and rollup updates

* ### Release 2.2.0-beta.3
* change eth_decrypt, eth_getEncryptionPublicKey adhere to the standard

* ### Release 2.2.0-beta.2
* Fix reference to css background class names in popUpCreator
* Fix typo with transaction receipt event
* Add eth_decrypt, eth_getEncryptionPublicKey, and eth_signtypeData_v3 methods
* Remove infuraid, always use rpcURL

### Release 2.1.23-beta.9

Expand Down
91 changes: 50 additions & 41 deletions dist/cjs/index.js

Large diffs are not rendered by default.

91 changes: 50 additions & 41 deletions dist/esm/index.js

Large diffs are not rendered by default.

24 changes: 0 additions & 24 deletions example/app/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ let web3;
const signTx = () => {
web3.eth.getBalance(this.userAddress).then(bal => this.balance);
web3.eth.getGasPrice().then(gasPrice => {
console.log(gasPrice); // todo remove dev item
web3.eth.getTransactionCount(this.userAddress).then(nonce => {
web3.eth
.sendTransaction({
Expand Down Expand Up @@ -418,7 +417,6 @@ export default {
},
mounted() {
//localStorage.debug = '*';
console.log('LOADEDED'); // todo remove dev item
this.connect = new mewConnect.Provider({
windowClosedError: true,
chainId: 1,
Expand Down Expand Up @@ -448,7 +446,6 @@ export default {
console.log(`accountsChanged User's address is DISCONNECTED`);
console.log('Wallet Core');
});
console.log(this.ethereum.on); // todo remove dev item
this.ethereum.on('disconnect', () => {
console.log('Provider: disconnect');
this.userAddress = '';
Expand Down Expand Up @@ -547,44 +544,33 @@ export default {
async onClick() {
try {
const accounts = await this.ethereum.enable();
console.log('ACCOUNTS', accounts); // todo remove dev item
console.log(`User's address is ${accounts[0]}`);
this.userAddress = accounts[0];
} catch (e) {
console.error(e); // todo replace with proper error
}
console.log(mewConnect.Provider.isConnected); // todo remove dev item
},
disconnect() {
this.connect.disconnect();
this.userAddress = '';
},
getAccount() {
console.log(this.ethereum); // todo remove dev item
this.ethereum
.request({ method: 'eth_requestAccounts' })
.then(accounts => {
console.log(`User's address is ${accounts[0]}`);
});
},
getBalance() {
console.log('this.userAddress', this.userAddress); // todo remove dev item
let value = 'something';
value = value.replace('some', '');
console.log(value); // todo remove dev item
console.log('PROVIDER this.userAddress', Object.keys(this.userAddress)); // todo remove dev item
console.log('this.userAddress', this.userAddress.replace('0x', '')); // todo remove dev item
this.web3.eth.getBalance(this.userAddress).then(res => {
console.log(res); // todo remove dev item
this.balance = res;
});
},
sendTx() {
this.web3.eth.getBalance(this.userAddress).then(bal => this.balance);
this.web3.eth.getGasPrice().then(gasPrice => {
console.log('gasPrice', gasPrice); // todo remove dev item
this.web3.eth.getTransactionCount(this.userAddress).then(nonce => {
console.log('nonce', nonce); // todo remove dev item
this.web3.eth
.sendTransaction({
from: this.userAddress,
Expand Down Expand Up @@ -615,12 +601,10 @@ export default {
if (this.altGasPrice !== '') {
gasPrice = this.altGasPrice;
}
console.log('gasPrice', gasPrice); // todo remove dev item
this.web3.eth.getTransactionCount(this.userAddress).then(nonce => {
if (this.altNonce !== '') {
nonce = this.altNonce;
}
console.log('nonce', nonce); // todo remove dev item
this.web3.eth
.sendTransaction({
from: this.userAddress,
Expand Down Expand Up @@ -678,9 +662,7 @@ export default {
signTx() {
this.web3.eth.getBalance(this.userAddress).then(bal => this.balance);
this.web3.eth.getGasPrice().then(gasPrice => {
console.log('gasPrice', gasPrice); // todo remove dev item
this.web3.eth.getTransactionCount(this.userAddress).then(nonce => {
console.log('nonce', nonce); // todo remove dev item
this.web3.eth
.signTransaction({
from: this.userAddress,
Expand All @@ -701,7 +683,6 @@ export default {
this.web3.eth.getBalance(this.userAddress).then(bal => this.balance);
this.web3.eth.getGasPrice().then(gasPrice => {
this.web3.eth.getTransactionCount(this.userAddress).then(nonce => {
console.log('NONCE', nonce); // todo remove dev item
this.web3.eth
.signTransaction(
{
Expand Down Expand Up @@ -1070,7 +1051,6 @@ export default {
(err, result) => {
if (!err) {
this.personalSignedResult = result;
// console.log('result:', result); // todo remove dev item
}
console.log(err);
}
Expand All @@ -1080,14 +1060,12 @@ 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 All @@ -1099,13 +1077,11 @@ export default {
'ecRecoverResult:',
address.toLowerCase() === this.userAddress.toLowerCase()
);
// todo remove dev item
} else console.error(err);
}
)
.then(console.log)
.catch(console.error);
console.log('res', res); // todo remove dev item
} catch (e) {
console.error(e);
}
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.2.0-beta.18",
"version": "2.2.0-beta.19",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"scripts": {
Expand Down
11 changes: 10 additions & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@ const IOS_LINK =
'https://apps.apple.com/app/apple-store/id1464614025?pt=118781877&ct=mc&mt=8';
const ANDROID_LINK =
'https://play.google.com/store/apps/details?id=com.myetherwallet.mewwallet&referrer=utm_source%3Dmc';
const ENKRYPT_LINK =
'https://chrome.google.com/webstore/detail/enkrypt/kkpllkodjeloidieedojogacfhpaihoh';
const DISCONNECTED = 'disconnected';
const CONNECTING = 'connecting';
const CONNECTED = 'connected';

export { IOS_LINK, ANDROID_LINK, DISCONNECTED, CONNECTED, CONNECTING };
export {
IOS_LINK,
ANDROID_LINK,
DISCONNECTED,
CONNECTED,
CONNECTING,
ENKRYPT_LINK
};
1 change: 1 addition & 0 deletions src/connectClient/initiator/MewConnectInitiator.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ Keys
}

this.webRtcCommunication.setActiveInitiatorId(this.V2.initiatorId);

const connectionErrorTimeOut = setTimeout(() => {
window.alert('Failed to start MEWconnect. Please try again.');
}, 60000);
Expand Down
4 changes: 2 additions & 2 deletions src/connectWindow/designTemplates/ActionInPageNotice.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
height: 23.2px;
}

.hidden {
.mew-hidden {
visibility: hidden;
}

Expand Down Expand Up @@ -260,7 +260,7 @@
});
setTimeout(() => {
refreshContainer.className = refreshContainer.className.replace(
'hidden',
'mew-hidden',
''
);
}, 5000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
justify-self: center;
}

.hidden {
.mew-hidden {
visibility: hidden;
}

Expand Down
4 changes: 2 additions & 2 deletions src/connectWindow/designTemplates/popupWindow.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
<div class="qr-code">
<canvas id="canvas"></canvas>
</div>
<div id="refresh-container" class="refreshIcon hidden">
<div id="refresh-container" class="refreshIcon mew-hidden">
<img id="refresh" src="${refresh}" />
</div>

Expand Down Expand Up @@ -248,7 +248,7 @@
});
setTimeout(() => {
refreshContainer.className = refreshContainer.className.replace(
'hidden',
'mew-hidden',
''
);
}, 5000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

div#Notifications-mew.hidden {
div#Notifications-mew.mew-hidden {
visibility: hidden;
}

Expand Down Expand Up @@ -370,7 +370,7 @@
});
setTimeout(() => {
refreshContainer.className = refreshContainer.className.replace(
'hidden',
'mew-hidden',
''
);
}, 5000);
Expand Down
7 changes: 6 additions & 1 deletion src/connectWindow/designTemplates/popupWindowModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,13 @@
justify-content: center;
margin-left: auto;
margin-right: auto;
display: flex;
}

.mew-refresh-icon#refresh {
padding-left: 5px;
}

.mew-hidden {
display: none;
}
Expand Down Expand Up @@ -259,7 +264,7 @@
position: relative;
min-width: 448px;
max-width: 448px;
min-height: 558px;
min-height: 658px;
overflow: auto;
opacity: 0;
visibility: hidden;
Expand Down
2 changes: 2 additions & 0 deletions src/connectWindow/images/enkrypt.js

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

4 changes: 3 additions & 1 deletion src/connectWindow/images/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import appStoreButton from './button-app-store';
import camera from './camera';
import closeIconWhite from './closeIconWhite';
import closeIconBlack from './closeIconBlack';
import enkrypt from './enkrypt';

export {
logoMEW,
Expand All @@ -17,5 +18,6 @@ export {
appStoreButton,
camera,
closeIconWhite,
closeIconBlack
closeIconBlack,
enkrypt
};
Loading