aboutsummaryrefslogtreecommitdiff
path: root/src/content_scripts/notify.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-03-03 15:37:04 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-03-03 15:37:17 +0100
commit16371276588b34769a09d940e608426b06ec3163 (patch)
treea3ac6a169502797cfa0145e726f9b7da0edf30bc /src/content_scripts/notify.ts
parentac342628533ddf1922c050d9c37428d73538d8d6 (diff)
have from contract, remove extended contract query
Diffstat (limited to 'src/content_scripts/notify.ts')
-rw-r--r--src/content_scripts/notify.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/content_scripts/notify.ts b/src/content_scripts/notify.ts
index a731e4da1..07ce87900 100644
--- a/src/content_scripts/notify.ts
+++ b/src/content_scripts/notify.ts
@@ -76,11 +76,10 @@ namespace TalerNotify {
});
}
- function queryPayment(query: any): Promise<any> {
- // current URL without fragment
+ function queryPayment(url: string): Promise<any> {
const walletMsg = {
type: "query-payment",
- detail: query,
+ detail: { url },
};
return new Promise((resolve, reject) => {
chrome.runtime.sendMessage(walletMsg, (resp: any) => {
@@ -331,7 +330,9 @@ namespace TalerNotify {
});
addHandler("taler-pay", async(msg: any, sendResponse: any) => {
- let res = await queryPayment(msg.contract_query);
+ // current URL without fragment
+ let url = URI(document.location.href).fragment("").href();
+ let res = await queryPayment(url);
logVerbose && console.log("taler-pay: got response", res);
if (res && res.payReq) {
sendResponse(res);