[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-web-common] branch master updated: remove obsolete f
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-web-common] branch master updated: remove obsolete functionality |
Date: |
Sun, 12 Feb 2017 23:34:31 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository web-common.
The following commit(s) were added to refs/heads/master by this push:
new d799774 remove obsolete functionality
d799774 is described below
commit d7997747f88c931a495a8fd7ef66fda1071e97ef
Author: Florian Dold <address@hidden>
AuthorDate: Sun Feb 12 23:34:28 2017 +0100
remove obsolete functionality
---
taler-wallet-lib.ts | 84 +----------------------------------------------------
1 file changed, 1 insertion(+), 83 deletions(-)
diff --git a/taler-wallet-lib.ts b/taler-wallet-lib.ts
index 1b2f83a..b3a8309 100644
--- a/taler-wallet-lib.ts
+++ b/taler-wallet-lib.ts
@@ -137,18 +137,6 @@ namespace taler {
}
- export function executePayment(contractHash: string, payUrl: string,
offeringUrl: string, onError?: any) {
- if (!installed) {
- logVerbose && console.log("delaying executePayment");
- taler.onPresent(() => {
- executePayment(contractHash, payUrl, offeringUrl);
- });
- return;
- }
- internalExecutePayment(contractHash, payUrl, offeringUrl);
- }
-
-
function handlePaymentResponse(resp: any, payUrl: string) {
function subst(url: string, contractHash: string) {
url = url.replace("${H_contract}", contractHash);
@@ -193,7 +181,7 @@ namespace taler {
r = new XMLHttpRequest();
r.open("post", payUrl);
r.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
- r.send(JSON.stringify(resp.payment));
+ r.send(JSON.stringify(resp.payReq));
r.onload = function() {
if (!r) {
return;
@@ -231,20 +219,6 @@ namespace taler {
}
- export function internalExecutePayment(contractHash: string, payUrl: string,
offeringUrl: string, onError?: any) {
- if (!contractHash) {
- raise_error("protocol-violation", {hint: "contract hash not given"});
- }
-
- let args = {
- H_contract: contractHash,
- offering_url: offeringUrl
- };
-
- callWallet("taler-get-payment", args, (r: any) => handlePaymentResponse(r,
payUrl));
- }
-
-
export function onPresent(f: any) {
presentHandlers.push(f);
}
@@ -253,62 +227,6 @@ namespace taler {
absentHandlers.push(f);
}
- export function offerContractFrom(url: string) {
- if (!installed) {
- logVerbose && console.log("delaying offerContractFrom until GNU Taler
wallet is present");
- taler.onPresent(() => {
- offerContractFrom(url);
- });
- return;
- }
- internalOfferContractFrom(url);
- }
-
- /**
- * Offer a contract to the wallet after
- * downloading it from the given URL.
- */
- export function internalOfferContractFrom(url: string) {
- function handle_contract(contract_wrapper: any) {
- let args = {
- contract_wrapper: contract_wrapper,
- replace_navigation: true
- }
- callWallet("taler-confirm-contract", args);
- };
-
- var contract_request = new XMLHttpRequest();
- logVerbose && console.log("downloading contract from '" + url + "'")
- contract_request.open("GET", url, true);
- contract_request.onload = function (e) {
- if (contract_request.readyState == 4) {
- if (contract_request.status == 200) {
- logVerbose && console.log("response text:",
- contract_request.responseText);
- var contract_wrapper = JSON.parse(contract_request.responseText);
- if (!contract_wrapper) {
- console.error("response text was invalid json");
- let detail = {hint: "invalid json", status:
contract_request.status, body: contract_request.responseText};
- raise_error("contract-failed", detail);
- return;
- }
- handle_contract(contract_wrapper);
- } else {
- let detail = {hint: "contract download failed", status:
contract_request.status, body: contract_request.responseText};
- raise_error("contract-failed", detail);
- return;
- }
- }
- };
- contract_request.onerror = function (e) {
- let detail = {hint: "contract download failed", status:
contract_request.status, body: contract_request.responseText};
- raise_error("contract-failed", detail);
- return;
- };
- contract_request.send();
- }
-
-
interface FulfillmentQuery {
type: "fulfillment_url";
}
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-web-common] branch master updated: remove obsolete functionality,
gnunet <=