aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules4
-rw-r--r--content_scripts/notify.ts3
l---------lib/taler-wallet-lib.ts1
-rw-r--r--lib/wallet/wxMessaging.ts1
-rw-r--r--manifest.json1
-rw-r--r--tsconfig.json2
m---------web-common0
7 files changed, 10 insertions, 2 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 000000000..f2656da2f
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,4 @@
+[submodule "web-common"]
+ path = web-common
+ url = git://taler.net/web-common
+ branch = master
diff --git a/content_scripts/notify.ts b/content_scripts/notify.ts
index 4d4978817..978e7e9a0 100644
--- a/content_scripts/notify.ts
+++ b/content_scripts/notify.ts
@@ -32,7 +32,6 @@
namespace TalerNotify {
const PROTOCOL_VERSION = 1;
- let taler: any;
if (!taler) {
console.error("Taler wallet lib not included, HTTP 402 payments not" +
" supported");
@@ -76,7 +75,7 @@ namespace TalerNotify {
} else if (resp && resp.type === "execute") {
console.log("it's execute");
document.documentElement.style.visibility = "hidden";
- taler.internalExecuteContract(resp.contractHash,
+ taler.internalExecutePayment(resp.contractHash,
resp.payUrl,
resp.offerUrl);
}
diff --git a/lib/taler-wallet-lib.ts b/lib/taler-wallet-lib.ts
new file mode 120000
index 000000000..20e599359
--- /dev/null
+++ b/lib/taler-wallet-lib.ts
@@ -0,0 +1 @@
+../web-common/taler-wallet-lib.ts \ No newline at end of file
diff --git a/lib/wallet/wxMessaging.ts b/lib/wallet/wxMessaging.ts
index 1bed80ca4..9ad2c7f6f 100644
--- a/lib/wallet/wxMessaging.ts
+++ b/lib/wallet/wxMessaging.ts
@@ -300,6 +300,7 @@ export function wxMain() {
if (uri.protocol() == "http" || uri.protocol() == "https") {
console.log("injecting into existing tab", tab.id);
chrome.tabs.executeScript(tab.id, {file: "lib/vendor/URI.js"});
+ chrome.tabs.executeScript(tab.id, {file: "lib/taler-wallet-lib.js"});
chrome.tabs.executeScript(tab.id, {file: "content_scripts/notify.js"});
}
}
diff --git a/manifest.json b/manifest.json
index 880515731..057855449 100644
--- a/manifest.json
+++ b/manifest.json
@@ -31,6 +31,7 @@
"matches": ["*://*/*"],
"js": [
"lib/vendor/URI.js",
+ "lib/taler-wallet-lib.js",
"content_scripts/notify.js"
],
"run_at": "document_start"
diff --git a/tsconfig.json b/tsconfig.json
index cbe7d039f..161b778f2 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -15,7 +15,9 @@
"lib/i18n.ts",
"lib/refs.ts",
"lib/shopApi.ts",
+ "lib/taler-wallet-lib.ts",
"lib/wallet/checkable.ts",
+ "lib/wallet/chromeBadge.ts",
"lib/wallet/cryptoApi.ts",
"lib/wallet/cryptoLib.ts",
"lib/wallet/cryptoWorker.ts",
diff --git a/web-common b/web-common
new file mode 160000
+Subproject aa18912d33902467450f207f9dcc392037a3fe7