Skip to content
Permalink
Browse files

align variable name

  • Loading branch information...
SteveMieskoski committed Nov 29, 2018
1 parent 9e06b4a commit 7f05bab8217ac13e51f064d15e44812915b57c84
@@ -617,22 +617,22 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
globalFuncs.MEWconnectStatus.update(0);
var app = new MewConnectEth();

globalFuncs.MEWconnectStatus.mewConnect = MewConnect.init();
globalFuncs.MEWconnectStatus.MEWconnect = MewConnect.init();

$scope.$on("$destroy", function() {
globalFuncs.MEWconnectStatus.newTabOpenedTrigger(false);
globalFuncs.MEWconnectStatus.update(0);
globalFuncs.MEWconnectStatus.mewConnect.disconnectRTC();
globalFuncs.MEWconnectStatus.mewConnect = null;
globalFuncs.MEWconnectStatus.MEWconnect.disconnectRTC();
globalFuncs.MEWconnectStatus.MEWconnect = null;
});

globalFuncs.MEWconnectStatus.mewConnect.on("codeDisplay", codeDisplay);
globalFuncs.MEWconnectStatus.mewConnect.on("RtcConnectedEvent", rtcConnected);
globalFuncs.MEWconnectStatus.mewConnect.on("RtcClosedEvent", rtcClosed);
globalFuncs.MEWconnectStatus.mewConnect.on("RtcDisconnectEvent", rtcDisconnected);
globalFuncs.MEWconnectStatus.mewConnect.on("address", makeWallet);
globalFuncs.MEWconnectStatus.MEWconnect.on("codeDisplay", codeDisplay);
globalFuncs.MEWconnectStatus.MEWconnect.on("RtcConnectedEvent", rtcConnected);
globalFuncs.MEWconnectStatus.MEWconnect.on("RtcClosedEvent", rtcClosed);
globalFuncs.MEWconnectStatus.MEWconnect.on("RtcDisconnectEvent", rtcDisconnected);
globalFuncs.MEWconnectStatus.MEWconnect.on("address", makeWallet);

app.setMewConnect(globalFuncs.MEWconnectStatus.mewConnect);
app.setMewConnect(globalFuncs.MEWconnectStatus.MEWconnect);
app.signalerConnect();

$scope.connectionCodeTimeout = null;
@@ -645,7 +645,7 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
if ($scope.mewConnectionStatus !== 2) {
$scope.connectionCodeTimeout = null;
uiFuncs.notifier.info("Connected Via MEWconnect");
globalFuncs.MEWconnectStatus.mewConnect.sendRtcMessage("address", "");
globalFuncs.MEWconnectStatus.MEWconnect.sendRtcMessage("address", "");
$scope.mewConnectionStatus = 2;
}
}
@@ -693,7 +693,7 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
};

$scope.mewConnectDisconnect = function() {
globalFuncs.MEWconnectStatus.mewConnect.disconnectRTC();
globalFuncs.MEWconnectStatus.MEWconnect.disconnectRTC();
};
//= ================ Mew Connect (end)==============================
$scope.getLedgerPath = function() {
@@ -202,7 +202,7 @@ var signMsgCtrl = function($scope, $sce, walletService) {
//TODO reset ui when rtc disconnects
// var msg = Buffer.from(thisMessage).toString("hex");
var connectApp = new MewConnectEth();
var mewConnect =globalFuncs.MEWconnectStatus.mewConnect;
var mewConnect =globalFuncs.MEWconnectStatus.MEWconnect;
connectApp.setMewConnect(mewConnect);
mewConnect.on("signMessage", function(data) {
$scope.signMsg.signedMsg = JSON.stringify(
@@ -144,7 +144,7 @@ uiFuncs.signTxMewConnect = function (eTx, rawTx, txData, callback) {

var app = new MewConnectEth()
// var mewConnect = MewConnect.instance
var mewConnect = globalFuncs.MEWconnectStatus.mewConnect;
var mewConnect = globalFuncs.MEWconnectStatus.MEWconnect;
app.setMewConnect(mewConnect)
mewConnect.once('signTx', function(data) {
uiFuncs.notifier.info("The transaction was signed but not sent. Click the blue 'Send Transaction' button to continue.")
globalFuncs.MEWconnectStatus.update(0);
var app = new MewConnectEth();

globalFuncs.MEWconnectStatus.mewConnect = MewConnect.init();
globalFuncs.MEWconnectStatus.MEWconnect = MewConnect.init();

$scope.$on("$destroy", function () {
globalFuncs.MEWconnectStatus.newTabOpenedTrigger(false);
globalFuncs.MEWconnectStatus.update(0);
globalFuncs.MEWconnectStatus.mewConnect.disconnectRTC();
globalFuncs.MEWconnectStatus.mewConnect = null;
globalFuncs.MEWconnectStatus.MEWconnect.disconnectRTC();
globalFuncs.MEWconnectStatus.MEWconnect = null;
});

globalFuncs.MEWconnectStatus.mewConnect.on("codeDisplay", codeDisplay);
globalFuncs.MEWconnectStatus.mewConnect.on("RtcConnectedEvent", rtcConnected);
globalFuncs.MEWconnectStatus.mewConnect.on("RtcClosedEvent", rtcClosed);
globalFuncs.MEWconnectStatus.mewConnect.on("RtcDisconnectEvent", rtcDisconnected);
globalFuncs.MEWconnectStatus.mewConnect.on("address", makeWallet);
globalFuncs.MEWconnectStatus.MEWconnect.on("codeDisplay", codeDisplay);
globalFuncs.MEWconnectStatus.MEWconnect.on("RtcConnectedEvent", rtcConnected);
globalFuncs.MEWconnectStatus.MEWconnect.on("RtcClosedEvent", rtcClosed);
globalFuncs.MEWconnectStatus.MEWconnect.on("RtcDisconnectEvent", rtcDisconnected);
globalFuncs.MEWconnectStatus.MEWconnect.on("address", makeWallet);

app.setMewConnect(globalFuncs.MEWconnectStatus.mewConnect);
app.setMewConnect(globalFuncs.MEWconnectStatus.MEWconnect);
app.signalerConnect();

$scope.connectionCodeTimeout = null;
if ($scope.mewConnectionStatus !== 2) {
$scope.connectionCodeTimeout = null;
uiFuncs.notifier.info("Connected Via MEWconnect");
globalFuncs.MEWconnectStatus.mewConnect.sendRtcMessage("address", "");
globalFuncs.MEWconnectStatus.MEWconnect.sendRtcMessage("address", "");
$scope.mewConnectionStatus = 2;
}
}
};

$scope.mewConnectDisconnect = function () {
globalFuncs.MEWconnectStatus.mewConnect.disconnectRTC();
globalFuncs.MEWconnectStatus.MEWconnect.disconnectRTC();
};
//= ================ Mew Connect (end)==============================
$scope.getLedgerPath = function () {
//TODO reset ui when rtc disconnects
// var msg = Buffer.from(thisMessage).toString("hex");
var connectApp = new MewConnectEth();
var mewConnect = globalFuncs.MEWconnectStatus.mewConnect;
var mewConnect = globalFuncs.MEWconnectStatus.MEWconnect;
connectApp.setMewConnect(mewConnect);
mewConnect.on("signMessage", function (data) {
$scope.signMsg.signedMsg = JSON.stringify({
key: 'checkBrowser',
value: function checkBrowser() {
var browser = window.browser;
console.log(browser.version); // todo remove dev item
var version = browser.version.split('.')[0];
/*
* Chrome > 23
} else {
return MewConnectEth.buildBrowserResult(false, '', '');
}
console.log(minVersion, +version); // todo remove dev item

try {
if (minVersion >= +version) {
return MewConnectEth.buildBrowserResult(true, name, 'version: ' + version);

var app = new MewConnectEth();
// var mewConnect = MewConnect.instance
var mewConnect = globalFuncs.MEWconnectStatus.mewConnect;
var mewConnect = globalFuncs.MEWconnectStatus.MEWconnect;
app.setMewConnect(mewConnect);
mewConnect.once('signTx', function (data) {
uiFuncs.notifier.info("The transaction was signed but not sent. Click the blue 'Send Transaction' button to continue.");
globalFuncs.MEWconnectStatus.update(0);
var app = new MewConnectEth();

globalFuncs.MEWconnectStatus.mewConnect = MewConnect.init();
globalFuncs.MEWconnectStatus.MEWconnect = MewConnect.init();

$scope.$on("$destroy", function () {
globalFuncs.MEWconnectStatus.newTabOpenedTrigger(false);
globalFuncs.MEWconnectStatus.update(0);
globalFuncs.MEWconnectStatus.mewConnect.disconnectRTC();
globalFuncs.MEWconnectStatus.mewConnect = null;
globalFuncs.MEWconnectStatus.MEWconnect.disconnectRTC();
globalFuncs.MEWconnectStatus.MEWconnect = null;
});

globalFuncs.MEWconnectStatus.mewConnect.on("codeDisplay", codeDisplay);
globalFuncs.MEWconnectStatus.mewConnect.on("RtcConnectedEvent", rtcConnected);
globalFuncs.MEWconnectStatus.mewConnect.on("RtcClosedEvent", rtcClosed);
globalFuncs.MEWconnectStatus.mewConnect.on("RtcDisconnectEvent", rtcDisconnected);
globalFuncs.MEWconnectStatus.mewConnect.on("address", makeWallet);
globalFuncs.MEWconnectStatus.MEWconnect.on("codeDisplay", codeDisplay);
globalFuncs.MEWconnectStatus.MEWconnect.on("RtcConnectedEvent", rtcConnected);
globalFuncs.MEWconnectStatus.MEWconnect.on("RtcClosedEvent", rtcClosed);
globalFuncs.MEWconnectStatus.MEWconnect.on("RtcDisconnectEvent", rtcDisconnected);
globalFuncs.MEWconnectStatus.MEWconnect.on("address", makeWallet);

app.setMewConnect(globalFuncs.MEWconnectStatus.mewConnect);
app.setMewConnect(globalFuncs.MEWconnectStatus.MEWconnect);
app.signalerConnect();

$scope.connectionCodeTimeout = null;
if ($scope.mewConnectionStatus !== 2) {
$scope.connectionCodeTimeout = null;
uiFuncs.notifier.info("Connected Via MEWconnect");
globalFuncs.MEWconnectStatus.mewConnect.sendRtcMessage("address", "");
globalFuncs.MEWconnectStatus.MEWconnect.sendRtcMessage("address", "");
$scope.mewConnectionStatus = 2;
}
}
};

$scope.mewConnectDisconnect = function () {
globalFuncs.MEWconnectStatus.mewConnect.disconnectRTC();
globalFuncs.MEWconnectStatus.MEWconnect.disconnectRTC();
};
//= ================ Mew Connect (end)==============================
$scope.getLedgerPath = function () {
//TODO reset ui when rtc disconnects
// var msg = Buffer.from(thisMessage).toString("hex");
var connectApp = new MewConnectEth();
var mewConnect = globalFuncs.MEWconnectStatus.mewConnect;
var mewConnect = globalFuncs.MEWconnectStatus.MEWconnect;
connectApp.setMewConnect(mewConnect);
mewConnect.on("signMessage", function (data) {
$scope.signMsg.signedMsg = JSON.stringify({
key: 'checkBrowser',
value: function checkBrowser() {
var browser = window.browser;
console.log(browser.version); // todo remove dev item
var version = browser.version.split('.')[0];
/*
* Chrome > 23
} else {
return MewConnectEth.buildBrowserResult(false, '', '');
}
console.log(minVersion, +version); // todo remove dev item

try {
if (minVersion >= +version) {
return MewConnectEth.buildBrowserResult(true, name, 'version: ' + version);

var app = new MewConnectEth();
// var mewConnect = MewConnect.instance
var mewConnect = globalFuncs.MEWconnectStatus.mewConnect;
var mewConnect = globalFuncs.MEWconnectStatus.MEWconnect;
app.setMewConnect(mewConnect);
mewConnect.once('signTx', function (data) {
uiFuncs.notifier.info("The transaction was signed but not sent. Click the blue 'Send Transaction' button to continue.");

0 comments on commit 7f05bab

Please sign in to comment.
You can’t perform that action at this time.