Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.

Commit

Permalink
Release: v3.22.3
Browse files Browse the repository at this point in the history
  • Loading branch information
gamalielhere committed Sep 21, 2018
1 parent fa48c16 commit c999444
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
28 changes: 14 additions & 14 deletions chrome-extension/js/etherwallet-master.js
Original file line number Diff line number Diff line change
Expand Up @@ -7001,16 +7001,20 @@ var signMsgCtrl = function signMsgCtrl($scope, $sce, walletService) {
var mewConnect = MewConnect.instance;
connectApp.setMewConnect(mewConnect);
mewConnect.on('signMessage', function (data) {
$scope.signMsg.signedMsg = JSON.parse(data);
$scope.signMsg.signedMsg = JSON.stringify({
address: $scope.wallet.getAddressString(),
msg: thisMessage,
sig: data.sig,
version: '3',
signer: 'MEW'
}, null, 2);
$scope.notifier.success('Successfully Signed Message with ' + $scope.wallet.getAddressString());
});
mewConnect.on('sign', function (data) {
$scope.signMsg.signedMsg = JSON.parse(data);
$scope.notifier.success('Successfully Signed Message with ' + $scope.wallet.getAddressString());
var hashedMessage = ethUtil.hashPersonalMessage(ethUtil.toBuffer(thisMessage)).toString('hex');
connectApp.signMessage({
hash: hashedMessage,
text: thisMessage
});
//TODO hash message before send. Currently sending as plain text
ethUtil.hashPersonalMessage(ethUtil.toBuffer(thisMessage)).toString('hex');
connectApp.signMessage(thisMessage);

//================= Mew Connect (end)==============================

Expand Down Expand Up @@ -7078,9 +7082,7 @@ var signMsgCtrl = function signMsgCtrl($scope, $sce, walletService) {
};

$scope.reOpenDecryptWalletMEWconnect = function () {
if ($scope.globalService.currentTab === 11) {
$scope.wd = false;
}
$scope.wd = false;
};
globalFuncs.MEWconnectStatus.registerDecryptOpeners($scope.reOpenDecryptWalletMEWconnect.bind(this));
};
Expand Down Expand Up @@ -19814,10 +19816,8 @@ var MewConnectEth = function () {
}
}, {
key: 'signMessage',
value: function signMessage(messageHex) {
var self = this;
var hashToSign = ethUtil.hashPersonalMessage(ethUtil.toBuffer(messageHex));
self.comm.sendRtcMessage('signMessage', hashToSign.toString('hex'));
value: function signMessage(message) {
this.comm.sendRtcMessage('signMessage', message);
}
}], [{
key: 'getBrowserRTC',
Expand Down
28 changes: 14 additions & 14 deletions dist/js/etherwallet-master.js
Original file line number Diff line number Diff line change
Expand Up @@ -7001,16 +7001,20 @@ var signMsgCtrl = function signMsgCtrl($scope, $sce, walletService) {
var mewConnect = MewConnect.instance;
connectApp.setMewConnect(mewConnect);
mewConnect.on('signMessage', function (data) {
$scope.signMsg.signedMsg = JSON.parse(data);
$scope.signMsg.signedMsg = JSON.stringify({
address: $scope.wallet.getAddressString(),
msg: thisMessage,
sig: data.sig,
version: '3',
signer: 'MEW'
}, null, 2);
$scope.notifier.success('Successfully Signed Message with ' + $scope.wallet.getAddressString());
});
mewConnect.on('sign', function (data) {
$scope.signMsg.signedMsg = JSON.parse(data);
$scope.notifier.success('Successfully Signed Message with ' + $scope.wallet.getAddressString());
var hashedMessage = ethUtil.hashPersonalMessage(ethUtil.toBuffer(thisMessage)).toString('hex');
connectApp.signMessage({
hash: hashedMessage,
text: thisMessage
});
//TODO hash message before send. Currently sending as plain text
ethUtil.hashPersonalMessage(ethUtil.toBuffer(thisMessage)).toString('hex');
connectApp.signMessage(thisMessage);

//================= Mew Connect (end)==============================

Expand Down Expand Up @@ -7078,9 +7082,7 @@ var signMsgCtrl = function signMsgCtrl($scope, $sce, walletService) {
};

$scope.reOpenDecryptWalletMEWconnect = function () {
if ($scope.globalService.currentTab === 11) {
$scope.wd = false;
}
$scope.wd = false;
};
globalFuncs.MEWconnectStatus.registerDecryptOpeners($scope.reOpenDecryptWalletMEWconnect.bind(this));
};
Expand Down Expand Up @@ -19814,10 +19816,8 @@ var MewConnectEth = function () {
}
}, {
key: 'signMessage',
value: function signMessage(messageHex) {
var self = this;
var hashToSign = ethUtil.hashPersonalMessage(ethUtil.toBuffer(messageHex));
self.comm.sendRtcMessage('signMessage', hashToSign.toString('hex'));
value: function signMessage(message) {
this.comm.sendRtcMessage('signMessage', message);
}
}], [{
key: 'getBrowserRTC',
Expand Down

0 comments on commit c999444

Please sign in to comment.