From 453f77770d887d4f6c0372d55051c4d36ebb1f9b Mon Sep 17 00:00:00 2001 From: Kadir Sekha Date: Mon, 12 Mar 2018 14:02:46 +0900 Subject: [PATCH] Revert "Merge remote-tracking branch 'origin/instantpaymentverification'" This reverts commit 523d63478bd6a7dd8240d5eb300a37a51ac80bfa, reversing changes made to 445dfbde210cb6d06369fcb97a07e6af5f122aa1. --- app-template/index.html | 1 - src/js/controllers/tab-receive.js | 82 -------------------- www/css/payment-received.css | 122 ------------------------------ www/index.html | 1 - www/views/tab-receive.html | 14 +--- 5 files changed, 1 insertion(+), 219 deletions(-) delete mode 100644 www/css/payment-received.css diff --git a/app-template/index.html b/app-template/index.html index 2946d7928..460fef3cc 100644 --- a/app-template/index.html +++ b/app-template/index.html @@ -7,7 +7,6 @@ - diff --git a/src/js/controllers/tab-receive.js b/src/js/controllers/tab-receive.js index 819192f75..89ea612e3 100644 --- a/src/js/controllers/tab-receive.js +++ b/src/js/controllers/tab-receive.js @@ -5,14 +5,10 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi var listeners = []; $scope.bchAddressType = { type: 'cashaddr' }; var bchAddresses = {}; - $scope.showingPaymentReceived = false; $scope.isCordova = platformInfo.isCordova; $scope.isNW = platformInfo.isNW; - var currentAddressSocket = {}; - var paymentSubscriptionObj = { op:"addr_sub" } - $scope.requestSpecificAmount = function() { $state.go('tabs.paymentRequest.amount', { id: $scope.wallet.credentials.walletId, @@ -32,39 +28,11 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi popupService.showAlert(err); } - //close existing socket - if (currentAddressSocket.close === 'function') { - currentAddressSocket.close(); - } - if ($scope.wallet.coin == 'bch') { bchAddresses = bitcoinCashJsService.translateAddresses(addr); $scope.addr = bchAddresses[$scope.bchAddressType.type]; - - // listen to bch address - currentAddressSocket = new WebSocket("wss://ws.blockchain.info/bch/inv"); - paymentSubscriptionObj.addr = bchAddresses['legacy']; - } else { $scope.addr = addr; - - // listen to btc address - currentAddressSocket = new WebSocket("wss://ws.blockchain.info/inv"); - paymentSubscriptionObj.addr = $scope.addr - } - - // create subscription - var msg = JSON.stringify(paymentSubscriptionObj); - currentAddressSocket.onopen = function (event) { - //console.log("message sent: " + msg); - currentAddressSocket.send(msg); - } - - - // listen for response - currentAddressSocket.onmessage = function (event) { - //console.log("message received:" + event.data); - receivedPayment(event.data); } $timeout(function() { @@ -73,56 +41,6 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi }); }; - var receivedPayment = function(data) { - data = JSON.parse(data); - //example payment data - /*{ - "op": "utx", - "x": { - "lock_time": 0, - "ver": 1, - "size": 192, - "inputs": [ - { - "sequence": 4294967295, - "prev_out": { - "spent": true, - "tx_index": 99005468, - "type": 0, - "addr": "1BwGf3z7n2fHk6NoVJNkV32qwyAYsMhkWf", - "value": 65574000, - "n": 0, - "script": "76a91477f4c9ee75e449a74c21a4decfb50519cbc245b388ac" - }, - "script": "483045022100e4ff962c292705f051c2c2fc519fa775a4d8955bce1a3e29884b2785277999ed02200b537ebd22a9f25fbbbcc9113c69c1389400703ef2017d80959ef0f1d685756c012102618e08e0c8fd4c5fe539184a30fe35a2f5fccf7ad62054cad29360d871f8187d" - } - ], - "time": 1440086763, - "tx_index": 99006637, - "vin_sz": 1, - "hash": "0857b9de1884eec314ecf67c040a2657b8e083e1f95e31d0b5ba3d328841fc7f", - "vout_sz": 1, - "relayed_by": "127.0.0.1", - "out": [ - { - "spent": false, - "tx_index": 99006637, - "type": 0, - "addr": "1A828tTnkVFJfSvLCqF42ohZ51ksS3jJgX", - "value": 65564000, - "n": 0, - "script": "76a914640cfdf7b79d94d1c980133e3587bd6053f091f388ac" - } - ] - } - }*/ - - if (data.op == "utx") { - $scope.showingPaymentReceived = true - $scope.$apply(); - } - } - $scope.displayAddress = function(type) { $scope.bchAddressType.type = type; $scope.addr = bchAddresses[$scope.bchAddressType.type]; diff --git a/www/css/payment-received.css b/www/css/payment-received.css deleted file mode 100644 index da7365c93..000000000 --- a/www/css/payment-received.css +++ /dev/null @@ -1,122 +0,0 @@ -/* -CSS svg animation - -Copyright (c) 2018 by Lee Porter (https://codepen.io/elevaunt/pen/JYRBzJ) - - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - - -svg { - width: 100px; - display: block; - margin: 40px auto 0; -} -.path { - stroke-dasharray: 1000; - stroke-dashoffset: 0; -} -.path.circle { - -webkit-animation: dash 0.9s ease-in-out; - animation: dash 0.9s ease-in-out; -} -.path.line { - stroke-dashoffset: 1000; - -webkit-animation: dash 0.9s 0.35s ease-in-out forwards; - animation: dash 0.9s 0.35s ease-in-out forwards; -} -.path.check { - stroke-dashoffset: -100; - -webkit-animation: dash-check 0.9s 0.35s ease-in-out forwards; - animation: dash-check 0.9s 0.35s ease-in-out forwards; -} -p { - text-align: center; - margin: 20px 0 60px; - font-size: 1.25em; -} -p.success { - color: #27B03C; - font-family:sans-serif; -} - -@-webkit-keyframes dash { - 0% { - stroke-dashoffset: 1000; - } - 100% { - stroke-dashoffset: 0; - } -} -@keyframes dash { - 0% { - stroke-dashoffset: 1000; - } - 100% { - stroke-dashoffset: 0; - } -} -@-webkit-keyframes dash-check { - 0% { - stroke-dashoffset: -100; - } - 100% { - stroke-dashoffset: 900; - } -} -@keyframes dash-check { - 0% { - stroke-dashoffset: -100; - } - 100% { - stroke-dashoffset: 900; - } -} - - -/*! - * animate.css -http://daneden.me/animate - * Version - 3.6.0 - * Licensed under the MIT license - http://opensource.org/licenses/MIT - * - * Copyright (c) 2018 Daniel Eden - */ - -.animated { - animation-delay: 0.55s; - -webkit-animation-duration: 0.5s; - animation-duration: 0.5s; - -webkit-animation-fill-mode: both; - animation-fill-mode: both; -} - - -@-webkit-keyframes fadeIn { - from { - opacity: 0; - } - - to { - opacity: 1; - } -} - -@keyframes fadeIn { - from { - opacity: 0; - } - - to { - opacity: 1; - } -} - -.fadeIn { - -webkit-animation-name: fadeIn; - animation-name: fadeIn; -} \ No newline at end of file diff --git a/www/index.html b/www/index.html index 76827f685..5a2642522 100644 --- a/www/index.html +++ b/www/index.html @@ -7,7 +7,6 @@ - diff --git a/www/views/tab-receive.html b/www/views/tab-receive.html index bffde00a9..ebc98a3cb 100644 --- a/www/views/tab-receive.html +++ b/www/views/tab-receive.html @@ -28,7 +28,6 @@
-
-
{{addr}}
+

-
-
- -
- - - - -

Payment Received!

Return To Address

-
-