pending operations WIP

This commit is contained in:
Florian Dold 2019-12-02 17:35:47 +01:00
parent e1369ff7e8
commit b5ee6b7b4e
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
22 changed files with 647 additions and 517 deletions

View File

@ -26,12 +26,10 @@ import {
} from "../headless/helpers"; } from "../headless/helpers";
import { openPromise, OpenedPromise } from "../util/promiseUtils"; import { openPromise, OpenedPromise } from "../util/promiseUtils";
import fs = require("fs"); import fs = require("fs");
import axios from "axios";
import { HttpRequestLibrary, HttpResponse } from "../util/http"; import { HttpRequestLibrary, HttpResponse } from "../util/http";
import querystring = require("querystring");
// @ts-ignore: special built-in module // @ts-ignore: special built-in module
import akono = require("akono"); //import akono = require("akono");
export class AndroidHttpLib implements HttpRequestLibrary { export class AndroidHttpLib implements HttpRequestLibrary {
useNfcTunnel: boolean = false; useNfcTunnel: boolean = false;
@ -102,7 +100,7 @@ export class AndroidHttpLib implements HttpRequestLibrary {
export function installAndroidWalletListener() { export function installAndroidWalletListener() {
// @ts-ignore // @ts-ignore
const sendMessage: (m: string) => void = akono.sendMessage; const sendMessage: (m: string) => void = globalThis.__akono_sendMessage;
if (typeof sendMessage !== "function") { if (typeof sendMessage !== "function") {
const errMsg = const errMsg =
"FATAL: cannot install android wallet listener: akono functions missing"; "FATAL: cannot install android wallet listener: akono functions missing";
@ -137,8 +135,12 @@ export function installAndroidWalletListener() {
persistentStoragePath: msg.args.persistentStoragePath, persistentStoragePath: msg.args.persistentStoragePath,
httpLib: httpLib, httpLib: httpLib,
}; };
maybeWallet = await getDefaultNodeWallet(walletArgs); const w = await getDefaultNodeWallet(walletArgs);
wp.resolve(maybeWallet); maybeWallet = w;
w.runLoopScheduledRetries().catch((e) => {
console.error("Error during wallet retry loop", e);
});
wp.resolve(w);
result = true; result = true;
break; break;
} }
@ -147,9 +149,19 @@ export function installAndroidWalletListener() {
result = await wallet.getBalances(); result = await wallet.getBalances();
break; break;
} }
case "getPendingOperations": {
const wallet = await wp.promise;
result = await wallet.getPendingOperations();
break;
}
case "withdrawTestkudos": { case "withdrawTestkudos": {
const wallet = await wp.promise; const wallet = await wp.promise;
result = await withdrawTestBalance(wallet); await withdrawTestBalance(wallet);
break;
}
case "getHistory": {
const wallet = await wp.promise;
result = await wallet.getHistory();
break; break;
} }
case "preparePay": { case "preparePay": {

View File

@ -28,7 +28,6 @@ import {
CoinRecord, CoinRecord,
DenominationRecord, DenominationRecord,
RefreshSessionRecord, RefreshSessionRecord,
ReserveRecord,
TipPlanchet, TipPlanchet,
WireFee, WireFee,
} from "../dbTypes"; } from "../dbTypes";
@ -195,7 +194,7 @@ export class CryptoApi {
}; };
this.resetWorkerTimeout(ws); this.resetWorkerTimeout(ws);
work.startTime = timer.performanceNow(); work.startTime = timer.performanceNow();
ws.w!.postMessage(msg); setImmediate(() => ws.w!.postMessage(msg));
} }
resetWorkerTimeout(ws: WorkerState) { resetWorkerTimeout(ws: WorkerState) {
@ -316,6 +315,7 @@ export class CryptoApi {
throw Error("assertion failed"); throw Error("assertion failed");
} }
this.workQueues[priority].push(workItem); this.workQueues[priority].push(workItem);
console.log("queueing crypto work");
return; return;
} }
@ -323,7 +323,6 @@ export class CryptoApi {
if (ws.currentWorkItem !== null) { if (ws.currentWorkItem !== null) {
continue; continue;
} }
this.wake(ws, workItem); this.wake(ws, workItem);
return; return;
} }

View File

@ -27,6 +27,26 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/util/wire.ts:38
#, c-format
msgid "Invalid Wire"
msgstr ""
#: src/util/wire.ts:43 src/util/wire.ts:46
#, c-format
msgid "Invalid Test Wire Detail"
msgstr ""
#: src/util/wire.ts:48
#, c-format
msgid "Test Wire Acct #%1$s on %2$s"
msgstr ""
#: src/util/wire.ts:50
#, c-format
msgid "Unknown Wire Detail"
msgstr ""
#: src/webex/pages/benchmark.tsx:57 #: src/webex/pages/benchmark.tsx:57
#, c-format #, c-format
msgid "Operation" msgid "Operation"
@ -37,77 +57,77 @@ msgstr ""
msgid "time (ms/op)" msgid "time (ms/op)"
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:118 #: src/webex/pages/pay.tsx:117
#, fuzzy, c-format #, fuzzy, c-format
msgid "The merchant %1$s offers you to purchase:" msgid "The merchant %1$s offers you to purchase:"
msgstr "Der Händler %1$s möchte einen Vertrag über %2$s mit Ihnen abschließen." msgstr "Der Händler %1$s möchte einen Vertrag über %2$s mit Ihnen abschließen."
#: src/webex/pages/pay.tsx:124 #: src/webex/pages/pay.tsx:123
#, c-format #, c-format
msgid "The total price is %1$s (plus %2$s fees)." msgid "The total price is %1$s (plus %2$s fees)."
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:129 #: src/webex/pages/pay.tsx:128
#, c-format #, c-format
msgid "The total price is %1$s." msgid "The total price is %1$s."
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:149 #: src/webex/pages/pay.tsx:148
#, c-format #, c-format
msgid "Retry" msgid "Retry"
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:158 #: src/webex/pages/pay.tsx:157
#, fuzzy, c-format #, fuzzy, c-format
msgid "Confirm payment" msgid "Confirm payment"
msgstr "Bezahlung bestätigen" msgstr "Bezahlung bestätigen"
#: src/webex/pages/popup.tsx:162 #: src/webex/pages/popup.tsx:159
#, c-format #, c-format
msgid "Balance" msgid "Balance"
msgstr "Saldo" msgstr "Saldo"
#: src/webex/pages/popup.tsx:163 #: src/webex/pages/popup.tsx:160
#, c-format #, c-format
msgid "History" msgid "History"
msgstr "Verlauf" msgstr "Verlauf"
#: src/webex/pages/popup.tsx:164 #: src/webex/pages/popup.tsx:161
#, c-format #, c-format
msgid "Debug" msgid "Debug"
msgstr "Debug" msgstr "Debug"
#: src/webex/pages/popup.tsx:200 #: src/webex/pages/popup.tsx:197
#, fuzzy, c-format #, fuzzy, c-format
msgid "You have no balance to show. Need some %1$s getting started?" msgid "You have no balance to show. Need some %1$s getting started?"
msgstr "Sie haben kein Digitalgeld. Wollen Sie %1$s? abheben?" msgstr "Sie haben kein Digitalgeld. Wollen Sie %1$s? abheben?"
#: src/webex/pages/popup.tsx:263 #: src/webex/pages/popup.tsx:260
#, c-format #, c-format
msgid "%1$s incoming" msgid "%1$s incoming"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:275 #: src/webex/pages/popup.tsx:272
#, c-format #, c-format
msgid "%1$s being spent" msgid "%1$s being spent"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:306 #: src/webex/pages/popup.tsx:303
#, c-format #, c-format
msgid "Error: could not retrieve balance information." msgid "Error: could not retrieve balance information."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:335 #: src/webex/pages/popup.tsx:332
#, fuzzy, c-format #, fuzzy, c-format
msgid "Bank requested reserve (%1$s) for %2$s." msgid "Bank requested reserve (%1$s) for %2$s."
msgstr "Bank bestätig anlegen der Reserve (%1$s) bei %2$s" msgstr "Bank bestätig anlegen der Reserve (%1$s) bei %2$s"
#: src/webex/pages/popup.tsx:344 #: src/webex/pages/popup.tsx:341
#, fuzzy, c-format #, fuzzy, c-format
msgid "Started to withdraw %1$s from %2$s (%3$s)." msgid "Started to withdraw %1$s from %2$s (%3$s)."
msgstr "Reserve (%1$s) mit %2$s bei %3$s erzeugt" msgstr "Reserve (%1$s) mit %2$s bei %3$s erzeugt"
#: src/webex/pages/popup.tsx:353 #: src/webex/pages/popup.tsx:350
#, fuzzy, c-format #, fuzzy, c-format
msgid "Merchant %1$s offered contract %2$s." msgid "Merchant %1$s offered contract %2$s."
msgstr "" msgstr ""
@ -115,17 +135,17 @@ msgstr ""
" möchte einen Vertrag über %2$s\n" " möchte einen Vertrag über %2$s\n"
" mit Ihnen abschließen." " mit Ihnen abschließen."
#: src/webex/pages/popup.tsx:366 #: src/webex/pages/popup.tsx:363
#, fuzzy, c-format #, fuzzy, c-format
msgid "Withdrew %1$s from %2$s ( %3$s)." msgid "Withdrew %1$s from %2$s ( %3$s)."
msgstr "Reserve (%1$s) mit %2$s bei %3$s erzeugt" msgstr "Reserve (%1$s) mit %2$s bei %3$s erzeugt"
#: src/webex/pages/popup.tsx:381 #: src/webex/pages/popup.tsx:378
#, fuzzy, c-format #, fuzzy, c-format
msgid "Paid %1$s to merchant %2$s.%3$s( %4$s)" msgid "Paid %1$s to merchant %2$s.%3$s( %4$s)"
msgstr "Reserve (%1$s) mit %2$s bei %3$s erzeugt" msgstr "Reserve (%1$s) mit %2$s bei %3$s erzeugt"
#: src/webex/pages/popup.tsx:391 #: src/webex/pages/popup.tsx:388
#, fuzzy, c-format #, fuzzy, c-format
msgid "Merchant %1$s gave a refund over %2$s." msgid "Merchant %1$s gave a refund over %2$s."
msgstr "" msgstr ""
@ -133,12 +153,12 @@ msgstr ""
" möchte einen Vertrag über %2$s\n" " möchte einen Vertrag über %2$s\n"
" mit Ihnen abschließen." " mit Ihnen abschließen."
#: src/webex/pages/popup.tsx:404 #: src/webex/pages/popup.tsx:400
#, c-format #, c-format
msgid "tip" msgid "tip"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:408 #: src/webex/pages/popup.tsx:404
#, fuzzy, c-format #, fuzzy, c-format
msgid "Merchant %1$s gave a %2$s of %3$s." msgid "Merchant %1$s gave a %2$s of %3$s."
msgstr "" msgstr ""
@ -146,22 +166,22 @@ msgstr ""
" möchte einen Vertrag über %2$s\n" " möchte einen Vertrag über %2$s\n"
" mit Ihnen abschließen." " mit Ihnen abschließen."
#: src/webex/pages/popup.tsx:414 #: src/webex/pages/popup.tsx:410
#, c-format #, c-format
msgid "You did not accept the tip yet." msgid "You did not accept the tip yet."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:422 #: src/webex/pages/popup.tsx:418
#, c-format #, c-format
msgid "Unknown event (%1$s)" msgid "Unknown event (%1$s)"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:464 #: src/webex/pages/popup.tsx:460
#, c-format #, c-format
msgid "Error: could not retrieve event history" msgid "Error: could not retrieve event history"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:489 #: src/webex/pages/popup.tsx:485
#, c-format #, c-format
msgid "Your wallet has no events recorded." msgid "Your wallet has no events recorded."
msgstr "Ihre Geldbörse verzeichnet keine Vorkommnisse." msgstr "Ihre Geldbörse verzeichnet keine Vorkommnisse."
@ -183,49 +203,49 @@ msgstr "Saldo"
#. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-# #. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#
#. TODO:generic error reporting function or component. #. TODO:generic error reporting function or component.
#: src/webex/pages/tip.tsx:118 src/webex/pages/withdraw.tsx:216 #: src/webex/pages/tip.tsx:116 src/webex/pages/withdraw.tsx:214
#, c-format #, c-format
msgid "Fatal error: \"%1$s\"." msgid "Fatal error: \"%1$s\"."
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:73 #: src/webex/pages/withdraw.tsx:72
#, c-format #, c-format
msgid "Could not get details for withdraw operation:" msgid "Could not get details for withdraw operation:"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:89 src/webex/pages/withdraw.tsx:179 #: src/webex/pages/withdraw.tsx:88 src/webex/pages/withdraw.tsx:178
#, c-format #, c-format
msgid "Chose different exchange provider" msgid "Chose different exchange provider"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:108 #: src/webex/pages/withdraw.tsx:107
#, c-format #, c-format
msgid "" msgid ""
"Please select an exchange. You can review the details before after your " "Please select an exchange. You can review the details before after your "
"selection." "selection."
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:120 #: src/webex/pages/withdraw.tsx:119
#, c-format #, c-format
msgid "Select %1$s" msgid "Select %1$s"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:142 #: src/webex/pages/withdraw.tsx:141
#, c-format #, c-format
msgid "Select custom exchange" msgid "Select custom exchange"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:159 #: src/webex/pages/withdraw.tsx:158
#, c-format #, c-format
msgid "You are about to withdraw %1$s from your bank account into your wallet." msgid "You are about to withdraw %1$s from your bank account into your wallet."
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:170 #: src/webex/pages/withdraw.tsx:169
#, c-format #, c-format
msgid "Accept fees and withdraw" msgid "Accept fees and withdraw"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:188 #: src/webex/pages/withdraw.tsx:187
#, c-format #, c-format
msgid "Cancel withdraw operation" msgid "Cancel withdraw operation"
msgstr "" msgstr ""
@ -270,26 +290,6 @@ msgstr ""
msgid "Deposit Fee" msgid "Deposit Fee"
msgstr "" msgstr ""
#: src/wire.ts:38
#, c-format
msgid "Invalid Wire"
msgstr ""
#: src/wire.ts:43 src/wire.ts:46
#, c-format
msgid "Invalid Test Wire Detail"
msgstr ""
#: src/wire.ts:48
#, c-format
msgid "Test Wire Acct #%1$s on %2$s"
msgstr ""
#: src/wire.ts:50
#, c-format
msgid "Unknown Wire Detail"
msgstr ""
#, fuzzy, c-format #, fuzzy, c-format
#~ msgid "Submitting payment" #~ msgid "Submitting payment"
#~ msgstr "Bezahlung bestätigen" #~ msgstr "Bezahlung bestätigen"

View File

@ -27,6 +27,26 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/util/wire.ts:38
#, c-format
msgid "Invalid Wire"
msgstr ""
#: src/util/wire.ts:43 src/util/wire.ts:46
#, c-format
msgid "Invalid Test Wire Detail"
msgstr ""
#: src/util/wire.ts:48
#, c-format
msgid "Test Wire Acct #%1$s on %2$s"
msgstr ""
#: src/util/wire.ts:50
#, c-format
msgid "Unknown Wire Detail"
msgstr ""
#: src/webex/pages/benchmark.tsx:57 #: src/webex/pages/benchmark.tsx:57
#, c-format #, c-format
msgid "Operation" msgid "Operation"
@ -37,122 +57,122 @@ msgstr ""
msgid "time (ms/op)" msgid "time (ms/op)"
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:118 #: src/webex/pages/pay.tsx:117
#, c-format #, c-format
msgid "The merchant %1$s offers you to purchase:" msgid "The merchant %1$s offers you to purchase:"
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:124 #: src/webex/pages/pay.tsx:123
#, c-format #, c-format
msgid "The total price is %1$s (plus %2$s fees)." msgid "The total price is %1$s (plus %2$s fees)."
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:129 #: src/webex/pages/pay.tsx:128
#, c-format #, c-format
msgid "The total price is %1$s." msgid "The total price is %1$s."
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:149 #: src/webex/pages/pay.tsx:148
#, c-format #, c-format
msgid "Retry" msgid "Retry"
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:158 #: src/webex/pages/pay.tsx:157
#, c-format #, c-format
msgid "Confirm payment" msgid "Confirm payment"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:162 #: src/webex/pages/popup.tsx:159
#, c-format #, c-format
msgid "Balance" msgid "Balance"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:163 #: src/webex/pages/popup.tsx:160
#, c-format #, c-format
msgid "History" msgid "History"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:164 #: src/webex/pages/popup.tsx:161
#, c-format #, c-format
msgid "Debug" msgid "Debug"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:200 #: src/webex/pages/popup.tsx:197
#, c-format #, c-format
msgid "You have no balance to show. Need some %1$s getting started?" msgid "You have no balance to show. Need some %1$s getting started?"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:263 #: src/webex/pages/popup.tsx:260
#, c-format #, c-format
msgid "%1$s incoming" msgid "%1$s incoming"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:275 #: src/webex/pages/popup.tsx:272
#, c-format #, c-format
msgid "%1$s being spent" msgid "%1$s being spent"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:306 #: src/webex/pages/popup.tsx:303
#, c-format #, c-format
msgid "Error: could not retrieve balance information." msgid "Error: could not retrieve balance information."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:335 #: src/webex/pages/popup.tsx:332
#, c-format #, c-format
msgid "Bank requested reserve (%1$s) for %2$s." msgid "Bank requested reserve (%1$s) for %2$s."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:344 #: src/webex/pages/popup.tsx:341
#, c-format #, c-format
msgid "Started to withdraw %1$s from %2$s (%3$s)." msgid "Started to withdraw %1$s from %2$s (%3$s)."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:353 #: src/webex/pages/popup.tsx:350
#, c-format #, c-format
msgid "Merchant %1$s offered contract %2$s." msgid "Merchant %1$s offered contract %2$s."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:366 #: src/webex/pages/popup.tsx:363
#, c-format #, c-format
msgid "Withdrew %1$s from %2$s ( %3$s)." msgid "Withdrew %1$s from %2$s ( %3$s)."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:381 #: src/webex/pages/popup.tsx:378
#, c-format #, c-format
msgid "Paid %1$s to merchant %2$s.%3$s( %4$s)" msgid "Paid %1$s to merchant %2$s.%3$s( %4$s)"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:391 #: src/webex/pages/popup.tsx:388
#, c-format #, c-format
msgid "Merchant %1$s gave a refund over %2$s." msgid "Merchant %1$s gave a refund over %2$s."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:404 #: src/webex/pages/popup.tsx:400
#, c-format #, c-format
msgid "tip" msgid "tip"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:408 #: src/webex/pages/popup.tsx:404
#, c-format #, c-format
msgid "Merchant %1$s gave a %2$s of %3$s." msgid "Merchant %1$s gave a %2$s of %3$s."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:414 #: src/webex/pages/popup.tsx:410
#, c-format #, c-format
msgid "You did not accept the tip yet." msgid "You did not accept the tip yet."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:422 #: src/webex/pages/popup.tsx:418
#, c-format #, c-format
msgid "Unknown event (%1$s)" msgid "Unknown event (%1$s)"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:464 #: src/webex/pages/popup.tsx:460
#, c-format #, c-format
msgid "Error: could not retrieve event history" msgid "Error: could not retrieve event history"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:489 #: src/webex/pages/popup.tsx:485
#, c-format #, c-format
msgid "Your wallet has no events recorded." msgid "Your wallet has no events recorded."
msgstr "" msgstr ""
@ -174,49 +194,49 @@ msgstr ""
#. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-# #. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#
#. TODO:generic error reporting function or component. #. TODO:generic error reporting function or component.
#: src/webex/pages/tip.tsx:118 src/webex/pages/withdraw.tsx:216 #: src/webex/pages/tip.tsx:116 src/webex/pages/withdraw.tsx:214
#, c-format #, c-format
msgid "Fatal error: \"%1$s\"." msgid "Fatal error: \"%1$s\"."
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:73 #: src/webex/pages/withdraw.tsx:72
#, c-format #, c-format
msgid "Could not get details for withdraw operation:" msgid "Could not get details for withdraw operation:"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:89 src/webex/pages/withdraw.tsx:179 #: src/webex/pages/withdraw.tsx:88 src/webex/pages/withdraw.tsx:178
#, c-format #, c-format
msgid "Chose different exchange provider" msgid "Chose different exchange provider"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:108 #: src/webex/pages/withdraw.tsx:107
#, c-format #, c-format
msgid "" msgid ""
"Please select an exchange. You can review the details before after your " "Please select an exchange. You can review the details before after your "
"selection." "selection."
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:120 #: src/webex/pages/withdraw.tsx:119
#, c-format #, c-format
msgid "Select %1$s" msgid "Select %1$s"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:142 #: src/webex/pages/withdraw.tsx:141
#, c-format #, c-format
msgid "Select custom exchange" msgid "Select custom exchange"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:159 #: src/webex/pages/withdraw.tsx:158
#, c-format #, c-format
msgid "You are about to withdraw %1$s from your bank account into your wallet." msgid "You are about to withdraw %1$s from your bank account into your wallet."
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:170 #: src/webex/pages/withdraw.tsx:169
#, c-format #, c-format
msgid "Accept fees and withdraw" msgid "Accept fees and withdraw"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:188 #: src/webex/pages/withdraw.tsx:187
#, c-format #, c-format
msgid "Cancel withdraw operation" msgid "Cancel withdraw operation"
msgstr "" msgstr ""
@ -261,26 +281,6 @@ msgstr ""
msgid "Deposit Fee" msgid "Deposit Fee"
msgstr "" msgstr ""
#: src/wire.ts:38
#, c-format
msgid "Invalid Wire"
msgstr ""
#: src/wire.ts:43 src/wire.ts:46
#, c-format
msgid "Invalid Test Wire Detail"
msgstr ""
#: src/wire.ts:48
#, c-format
msgid "Test Wire Acct #%1$s on %2$s"
msgstr ""
#: src/wire.ts:50
#, c-format
msgid "Unknown Wire Detail"
msgstr ""
#, fuzzy #, fuzzy
#~ msgid "DEBUG: Your balance on %1$s is %2$s KUDO. Get more at %3$s" #~ msgid "DEBUG: Your balance on %1$s is %2$s KUDO. Get more at %3$s"
#~ msgstr "DEBUG: Your balance is %2$s KUDO on %1$s. Get more at %3$s" #~ msgstr "DEBUG: Your balance is %2$s KUDO on %1$s. Get more at %3$s"

View File

@ -27,6 +27,26 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/util/wire.ts:38
#, c-format
msgid "Invalid Wire"
msgstr ""
#: src/util/wire.ts:43 src/util/wire.ts:46
#, c-format
msgid "Invalid Test Wire Detail"
msgstr ""
#: src/util/wire.ts:48
#, c-format
msgid "Test Wire Acct #%1$s on %2$s"
msgstr ""
#: src/util/wire.ts:50
#, c-format
msgid "Unknown Wire Detail"
msgstr ""
#: src/webex/pages/benchmark.tsx:57 #: src/webex/pages/benchmark.tsx:57
#, c-format #, c-format
msgid "Operation" msgid "Operation"
@ -37,122 +57,122 @@ msgstr ""
msgid "time (ms/op)" msgid "time (ms/op)"
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:118 #: src/webex/pages/pay.tsx:117
#, c-format #, c-format
msgid "The merchant %1$s offers you to purchase:" msgid "The merchant %1$s offers you to purchase:"
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:124 #: src/webex/pages/pay.tsx:123
#, c-format #, c-format
msgid "The total price is %1$s (plus %2$s fees)." msgid "The total price is %1$s (plus %2$s fees)."
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:129 #: src/webex/pages/pay.tsx:128
#, c-format #, c-format
msgid "The total price is %1$s." msgid "The total price is %1$s."
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:149 #: src/webex/pages/pay.tsx:148
#, c-format #, c-format
msgid "Retry" msgid "Retry"
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:158 #: src/webex/pages/pay.tsx:157
#, c-format #, c-format
msgid "Confirm payment" msgid "Confirm payment"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:162 #: src/webex/pages/popup.tsx:159
#, c-format #, c-format
msgid "Balance" msgid "Balance"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:163 #: src/webex/pages/popup.tsx:160
#, c-format #, c-format
msgid "History" msgid "History"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:164 #: src/webex/pages/popup.tsx:161
#, c-format #, c-format
msgid "Debug" msgid "Debug"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:200 #: src/webex/pages/popup.tsx:197
#, c-format #, c-format
msgid "You have no balance to show. Need some %1$s getting started?" msgid "You have no balance to show. Need some %1$s getting started?"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:263 #: src/webex/pages/popup.tsx:260
#, c-format #, c-format
msgid "%1$s incoming" msgid "%1$s incoming"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:275 #: src/webex/pages/popup.tsx:272
#, c-format #, c-format
msgid "%1$s being spent" msgid "%1$s being spent"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:306 #: src/webex/pages/popup.tsx:303
#, c-format #, c-format
msgid "Error: could not retrieve balance information." msgid "Error: could not retrieve balance information."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:335 #: src/webex/pages/popup.tsx:332
#, c-format #, c-format
msgid "Bank requested reserve (%1$s) for %2$s." msgid "Bank requested reserve (%1$s) for %2$s."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:344 #: src/webex/pages/popup.tsx:341
#, c-format #, c-format
msgid "Started to withdraw %1$s from %2$s (%3$s)." msgid "Started to withdraw %1$s from %2$s (%3$s)."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:353 #: src/webex/pages/popup.tsx:350
#, c-format #, c-format
msgid "Merchant %1$s offered contract %2$s." msgid "Merchant %1$s offered contract %2$s."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:366 #: src/webex/pages/popup.tsx:363
#, c-format #, c-format
msgid "Withdrew %1$s from %2$s ( %3$s)." msgid "Withdrew %1$s from %2$s ( %3$s)."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:381 #: src/webex/pages/popup.tsx:378
#, c-format #, c-format
msgid "Paid %1$s to merchant %2$s.%3$s( %4$s)" msgid "Paid %1$s to merchant %2$s.%3$s( %4$s)"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:391 #: src/webex/pages/popup.tsx:388
#, c-format #, c-format
msgid "Merchant %1$s gave a refund over %2$s." msgid "Merchant %1$s gave a refund over %2$s."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:404 #: src/webex/pages/popup.tsx:400
#, c-format #, c-format
msgid "tip" msgid "tip"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:408 #: src/webex/pages/popup.tsx:404
#, c-format #, c-format
msgid "Merchant %1$s gave a %2$s of %3$s." msgid "Merchant %1$s gave a %2$s of %3$s."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:414 #: src/webex/pages/popup.tsx:410
#, c-format #, c-format
msgid "You did not accept the tip yet." msgid "You did not accept the tip yet."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:422 #: src/webex/pages/popup.tsx:418
#, c-format #, c-format
msgid "Unknown event (%1$s)" msgid "Unknown event (%1$s)"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:464 #: src/webex/pages/popup.tsx:460
#, c-format #, c-format
msgid "Error: could not retrieve event history" msgid "Error: could not retrieve event history"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:489 #: src/webex/pages/popup.tsx:485
#, c-format #, c-format
msgid "Your wallet has no events recorded." msgid "Your wallet has no events recorded."
msgstr "" msgstr ""
@ -174,49 +194,49 @@ msgstr ""
#. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-# #. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#
#. TODO:generic error reporting function or component. #. TODO:generic error reporting function or component.
#: src/webex/pages/tip.tsx:118 src/webex/pages/withdraw.tsx:216 #: src/webex/pages/tip.tsx:116 src/webex/pages/withdraw.tsx:214
#, c-format #, c-format
msgid "Fatal error: \"%1$s\"." msgid "Fatal error: \"%1$s\"."
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:73 #: src/webex/pages/withdraw.tsx:72
#, c-format #, c-format
msgid "Could not get details for withdraw operation:" msgid "Could not get details for withdraw operation:"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:89 src/webex/pages/withdraw.tsx:179 #: src/webex/pages/withdraw.tsx:88 src/webex/pages/withdraw.tsx:178
#, c-format #, c-format
msgid "Chose different exchange provider" msgid "Chose different exchange provider"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:108 #: src/webex/pages/withdraw.tsx:107
#, c-format #, c-format
msgid "" msgid ""
"Please select an exchange. You can review the details before after your " "Please select an exchange. You can review the details before after your "
"selection." "selection."
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:120 #: src/webex/pages/withdraw.tsx:119
#, c-format #, c-format
msgid "Select %1$s" msgid "Select %1$s"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:142 #: src/webex/pages/withdraw.tsx:141
#, c-format #, c-format
msgid "Select custom exchange" msgid "Select custom exchange"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:159 #: src/webex/pages/withdraw.tsx:158
#, c-format #, c-format
msgid "You are about to withdraw %1$s from your bank account into your wallet." msgid "You are about to withdraw %1$s from your bank account into your wallet."
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:170 #: src/webex/pages/withdraw.tsx:169
#, c-format #, c-format
msgid "Accept fees and withdraw" msgid "Accept fees and withdraw"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:188 #: src/webex/pages/withdraw.tsx:187
#, c-format #, c-format
msgid "Cancel withdraw operation" msgid "Cancel withdraw operation"
msgstr "" msgstr ""
@ -260,23 +280,3 @@ msgstr ""
#, c-format #, c-format
msgid "Deposit Fee" msgid "Deposit Fee"
msgstr "" msgstr ""
#: src/wire.ts:38
#, c-format
msgid "Invalid Wire"
msgstr ""
#: src/wire.ts:43 src/wire.ts:46
#, c-format
msgid "Invalid Test Wire Detail"
msgstr ""
#: src/wire.ts:48
#, c-format
msgid "Test Wire Acct #%1$s on %2$s"
msgstr ""
#: src/wire.ts:50
#, c-format
msgid "Unknown Wire Detail"
msgstr ""

View File

@ -27,6 +27,26 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/util/wire.ts:38
#, c-format
msgid "Invalid Wire"
msgstr ""
#: src/util/wire.ts:43 src/util/wire.ts:46
#, c-format
msgid "Invalid Test Wire Detail"
msgstr ""
#: src/util/wire.ts:48
#, c-format
msgid "Test Wire Acct #%1$s on %2$s"
msgstr ""
#: src/util/wire.ts:50
#, c-format
msgid "Unknown Wire Detail"
msgstr ""
#: src/webex/pages/benchmark.tsx:57 #: src/webex/pages/benchmark.tsx:57
#, c-format #, c-format
msgid "Operation" msgid "Operation"
@ -37,122 +57,122 @@ msgstr ""
msgid "time (ms/op)" msgid "time (ms/op)"
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:118 #: src/webex/pages/pay.tsx:117
#, c-format #, c-format
msgid "The merchant %1$s offers you to purchase:" msgid "The merchant %1$s offers you to purchase:"
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:124 #: src/webex/pages/pay.tsx:123
#, c-format #, c-format
msgid "The total price is %1$s (plus %2$s fees)." msgid "The total price is %1$s (plus %2$s fees)."
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:129 #: src/webex/pages/pay.tsx:128
#, c-format #, c-format
msgid "The total price is %1$s." msgid "The total price is %1$s."
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:149 #: src/webex/pages/pay.tsx:148
#, c-format #, c-format
msgid "Retry" msgid "Retry"
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:158 #: src/webex/pages/pay.tsx:157
#, c-format #, c-format
msgid "Confirm payment" msgid "Confirm payment"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:162 #: src/webex/pages/popup.tsx:159
#, c-format #, c-format
msgid "Balance" msgid "Balance"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:163 #: src/webex/pages/popup.tsx:160
#, c-format #, c-format
msgid "History" msgid "History"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:164 #: src/webex/pages/popup.tsx:161
#, c-format #, c-format
msgid "Debug" msgid "Debug"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:200 #: src/webex/pages/popup.tsx:197
#, c-format #, c-format
msgid "You have no balance to show. Need some %1$s getting started?" msgid "You have no balance to show. Need some %1$s getting started?"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:263 #: src/webex/pages/popup.tsx:260
#, c-format #, c-format
msgid "%1$s incoming" msgid "%1$s incoming"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:275 #: src/webex/pages/popup.tsx:272
#, c-format #, c-format
msgid "%1$s being spent" msgid "%1$s being spent"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:306 #: src/webex/pages/popup.tsx:303
#, c-format #, c-format
msgid "Error: could not retrieve balance information." msgid "Error: could not retrieve balance information."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:335 #: src/webex/pages/popup.tsx:332
#, c-format #, c-format
msgid "Bank requested reserve (%1$s) for %2$s." msgid "Bank requested reserve (%1$s) for %2$s."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:344 #: src/webex/pages/popup.tsx:341
#, c-format #, c-format
msgid "Started to withdraw %1$s from %2$s (%3$s)." msgid "Started to withdraw %1$s from %2$s (%3$s)."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:353 #: src/webex/pages/popup.tsx:350
#, c-format #, c-format
msgid "Merchant %1$s offered contract %2$s." msgid "Merchant %1$s offered contract %2$s."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:366 #: src/webex/pages/popup.tsx:363
#, c-format #, c-format
msgid "Withdrew %1$s from %2$s ( %3$s)." msgid "Withdrew %1$s from %2$s ( %3$s)."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:381 #: src/webex/pages/popup.tsx:378
#, c-format #, c-format
msgid "Paid %1$s to merchant %2$s.%3$s( %4$s)" msgid "Paid %1$s to merchant %2$s.%3$s( %4$s)"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:391 #: src/webex/pages/popup.tsx:388
#, c-format #, c-format
msgid "Merchant %1$s gave a refund over %2$s." msgid "Merchant %1$s gave a refund over %2$s."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:404 #: src/webex/pages/popup.tsx:400
#, c-format #, c-format
msgid "tip" msgid "tip"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:408 #: src/webex/pages/popup.tsx:404
#, c-format #, c-format
msgid "Merchant %1$s gave a %2$s of %3$s." msgid "Merchant %1$s gave a %2$s of %3$s."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:414 #: src/webex/pages/popup.tsx:410
#, c-format #, c-format
msgid "You did not accept the tip yet." msgid "You did not accept the tip yet."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:422 #: src/webex/pages/popup.tsx:418
#, c-format #, c-format
msgid "Unknown event (%1$s)" msgid "Unknown event (%1$s)"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:464 #: src/webex/pages/popup.tsx:460
#, c-format #, c-format
msgid "Error: could not retrieve event history" msgid "Error: could not retrieve event history"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:489 #: src/webex/pages/popup.tsx:485
#, c-format #, c-format
msgid "Your wallet has no events recorded." msgid "Your wallet has no events recorded."
msgstr "" msgstr ""
@ -174,49 +194,49 @@ msgstr ""
#. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-# #. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#
#. TODO:generic error reporting function or component. #. TODO:generic error reporting function or component.
#: src/webex/pages/tip.tsx:118 src/webex/pages/withdraw.tsx:216 #: src/webex/pages/tip.tsx:116 src/webex/pages/withdraw.tsx:214
#, c-format #, c-format
msgid "Fatal error: \"%1$s\"." msgid "Fatal error: \"%1$s\"."
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:73 #: src/webex/pages/withdraw.tsx:72
#, c-format #, c-format
msgid "Could not get details for withdraw operation:" msgid "Could not get details for withdraw operation:"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:89 src/webex/pages/withdraw.tsx:179 #: src/webex/pages/withdraw.tsx:88 src/webex/pages/withdraw.tsx:178
#, c-format #, c-format
msgid "Chose different exchange provider" msgid "Chose different exchange provider"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:108 #: src/webex/pages/withdraw.tsx:107
#, c-format #, c-format
msgid "" msgid ""
"Please select an exchange. You can review the details before after your " "Please select an exchange. You can review the details before after your "
"selection." "selection."
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:120 #: src/webex/pages/withdraw.tsx:119
#, c-format #, c-format
msgid "Select %1$s" msgid "Select %1$s"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:142 #: src/webex/pages/withdraw.tsx:141
#, c-format #, c-format
msgid "Select custom exchange" msgid "Select custom exchange"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:159 #: src/webex/pages/withdraw.tsx:158
#, c-format #, c-format
msgid "You are about to withdraw %1$s from your bank account into your wallet." msgid "You are about to withdraw %1$s from your bank account into your wallet."
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:170 #: src/webex/pages/withdraw.tsx:169
#, c-format #, c-format
msgid "Accept fees and withdraw" msgid "Accept fees and withdraw"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:188 #: src/webex/pages/withdraw.tsx:187
#, c-format #, c-format
msgid "Cancel withdraw operation" msgid "Cancel withdraw operation"
msgstr "" msgstr ""
@ -260,23 +280,3 @@ msgstr ""
#, c-format #, c-format
msgid "Deposit Fee" msgid "Deposit Fee"
msgstr "" msgstr ""
#: src/wire.ts:38
#, c-format
msgid "Invalid Wire"
msgstr ""
#: src/wire.ts:43 src/wire.ts:46
#, c-format
msgid "Invalid Test Wire Detail"
msgstr ""
#: src/wire.ts:48
#, c-format
msgid "Test Wire Acct #%1$s on %2$s"
msgstr ""
#: src/wire.ts:50
#, c-format
msgid "Unknown Wire Detail"
msgstr ""

View File

@ -24,6 +24,22 @@ strings['de'] = {
"plural_forms": "nplurals=2; plural=(n != 1);", "plural_forms": "nplurals=2; plural=(n != 1);",
"lang": "" "lang": ""
}, },
"Invalid Wire": [
null,
""
],
"Invalid Test Wire Detail": [
null,
""
],
"Test Wire Acct #%1$s on %2$s": [
null,
""
],
"Unknown Wire Detail": [
null,
""
],
"Operation": [ "Operation": [
null, null,
"" ""
@ -207,7 +223,19 @@ strings['de'] = {
"Deposit Fee": [ "Deposit Fee": [
null, null,
"" ""
], ]
}
}
};
strings['en-US'] = {
"domain": "messages",
"locale_data": {
"messages": {
"": {
"domain": "messages",
"plural_forms": "nplurals=2; plural=(n != 1);",
"lang": ""
},
"Invalid Wire": [ "Invalid Wire": [
null, null,
"" ""
@ -223,19 +251,7 @@ strings['de'] = {
"Unknown Wire Detail": [ "Unknown Wire Detail": [
null, null,
"" ""
] ],
}
}
};
strings['en-US'] = {
"domain": "messages",
"locale_data": {
"messages": {
"": {
"domain": "messages",
"plural_forms": "nplurals=2; plural=(n != 1);",
"lang": ""
},
"Operation": [ "Operation": [
null, null,
"" ""
@ -419,22 +435,6 @@ strings['en-US'] = {
"Deposit Fee": [ "Deposit Fee": [
null, null,
"" ""
],
"Invalid Wire": [
null,
""
],
"Invalid Test Wire Detail": [
null,
""
],
"Test Wire Acct #%1$s on %2$s": [
null,
""
],
"Unknown Wire Detail": [
null,
""
] ]
} }
} }
@ -448,6 +448,22 @@ strings['fr'] = {
"plural_forms": "nplurals=2; plural=(n != 1);", "plural_forms": "nplurals=2; plural=(n != 1);",
"lang": "" "lang": ""
}, },
"Invalid Wire": [
null,
""
],
"Invalid Test Wire Detail": [
null,
""
],
"Test Wire Acct #%1$s on %2$s": [
null,
""
],
"Unknown Wire Detail": [
null,
""
],
"Operation": [ "Operation": [
null, null,
"" ""
@ -631,22 +647,6 @@ strings['fr'] = {
"Deposit Fee": [ "Deposit Fee": [
null, null,
"" ""
],
"Invalid Wire": [
null,
""
],
"Invalid Test Wire Detail": [
null,
""
],
"Test Wire Acct #%1$s on %2$s": [
null,
""
],
"Unknown Wire Detail": [
null,
""
] ]
} }
} }
@ -660,6 +660,22 @@ strings['it'] = {
"plural_forms": "nplurals=2; plural=(n != 1);", "plural_forms": "nplurals=2; plural=(n != 1);",
"lang": "" "lang": ""
}, },
"Invalid Wire": [
null,
""
],
"Invalid Test Wire Detail": [
null,
""
],
"Test Wire Acct #%1$s on %2$s": [
null,
""
],
"Unknown Wire Detail": [
null,
""
],
"Operation": [ "Operation": [
null, null,
"" ""
@ -843,7 +859,19 @@ strings['it'] = {
"Deposit Fee": [ "Deposit Fee": [
null, null,
"" ""
], ]
}
}
};
strings['sv'] = {
"domain": "messages",
"locale_data": {
"messages": {
"": {
"domain": "messages",
"plural_forms": "nplurals=2; plural=(n != 1);",
"lang": ""
},
"Invalid Wire": [ "Invalid Wire": [
null, null,
"" ""
@ -858,20 +886,8 @@ strings['it'] = {
], ],
"Unknown Wire Detail": [ "Unknown Wire Detail": [
null, null,
"" "visa mer"
] ],
}
}
};
strings['sv'] = {
"domain": "messages",
"locale_data": {
"messages": {
"": {
"domain": "messages",
"plural_forms": "nplurals=2; plural=(n != 1);",
"lang": ""
},
"Operation": [ "Operation": [
null, null,
"" ""
@ -1055,22 +1071,6 @@ strings['sv'] = {
"Deposit Fee": [ "Deposit Fee": [
null, null,
"Depostitions avgift" "Depostitions avgift"
],
"Invalid Wire": [
null,
""
],
"Invalid Test Wire Detail": [
null,
""
],
"Test Wire Acct #%1$s on %2$s": [
null,
""
],
"Unknown Wire Detail": [
null,
"visa mer"
] ]
} }
} }

View File

@ -27,6 +27,26 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/util/wire.ts:38
#, c-format
msgid "Invalid Wire"
msgstr ""
#: src/util/wire.ts:43 src/util/wire.ts:46
#, c-format
msgid "Invalid Test Wire Detail"
msgstr ""
#: src/util/wire.ts:48
#, c-format
msgid "Test Wire Acct #%1$s on %2$s"
msgstr ""
#: src/util/wire.ts:50
#, fuzzy, c-format
msgid "Unknown Wire Detail"
msgstr "visa mer"
#: src/webex/pages/benchmark.tsx:57 #: src/webex/pages/benchmark.tsx:57
#, c-format #, c-format
msgid "Operation" msgid "Operation"
@ -37,124 +57,124 @@ msgstr ""
msgid "time (ms/op)" msgid "time (ms/op)"
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:118 #: src/webex/pages/pay.tsx:117
#, fuzzy, c-format #, fuzzy, c-format
msgid "The merchant %1$s offers you to purchase:" msgid "The merchant %1$s offers you to purchase:"
msgstr "Säljaren %1$s erbjuder följande:" msgstr "Säljaren %1$s erbjuder följande:"
#: src/webex/pages/pay.tsx:124 #: src/webex/pages/pay.tsx:123
#, fuzzy, c-format #, fuzzy, c-format
msgid "The total price is %1$s (plus %2$s fees)." msgid "The total price is %1$s (plus %2$s fees)."
msgstr "Det totala priset är %1$s (plus %2$s avgifter).\n" msgstr "Det totala priset är %1$s (plus %2$s avgifter).\n"
#: src/webex/pages/pay.tsx:129 #: src/webex/pages/pay.tsx:128
#, fuzzy, c-format #, fuzzy, c-format
msgid "The total price is %1$s." msgid "The total price is %1$s."
msgstr "Det totala priset är %1$s." msgstr "Det totala priset är %1$s."
#: src/webex/pages/pay.tsx:149 #: src/webex/pages/pay.tsx:148
#, c-format #, c-format
msgid "Retry" msgid "Retry"
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:158 #: src/webex/pages/pay.tsx:157
#, c-format #, c-format
msgid "Confirm payment" msgid "Confirm payment"
msgstr "Godkän betalning" msgstr "Godkän betalning"
#: src/webex/pages/popup.tsx:162 #: src/webex/pages/popup.tsx:159
#, c-format #, c-format
msgid "Balance" msgid "Balance"
msgstr "Balans" msgstr "Balans"
#: src/webex/pages/popup.tsx:163 #: src/webex/pages/popup.tsx:160
#, c-format #, c-format
msgid "History" msgid "History"
msgstr "Historia" msgstr "Historia"
#: src/webex/pages/popup.tsx:164 #: src/webex/pages/popup.tsx:161
#, c-format #, c-format
msgid "Debug" msgid "Debug"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:200 #: src/webex/pages/popup.tsx:197
#, fuzzy, c-format #, fuzzy, c-format
msgid "You have no balance to show. Need some %1$s getting started?" msgid "You have no balance to show. Need some %1$s getting started?"
msgstr "" msgstr ""
"Du har ingen balans att visa. Behöver du\n" "Du har ingen balans att visa. Behöver du\n"
" %1$s att börja?\n" " %1$s att börja?\n"
#: src/webex/pages/popup.tsx:263 #: src/webex/pages/popup.tsx:260
#, fuzzy, c-format #, fuzzy, c-format
msgid "%1$s incoming" msgid "%1$s incoming"
msgstr "%1$s inkommande" msgstr "%1$s inkommande"
#: src/webex/pages/popup.tsx:275 #: src/webex/pages/popup.tsx:272
#, c-format #, c-format
msgid "%1$s being spent" msgid "%1$s being spent"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:306 #: src/webex/pages/popup.tsx:303
#, c-format #, c-format
msgid "Error: could not retrieve balance information." msgid "Error: could not retrieve balance information."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:335 #: src/webex/pages/popup.tsx:332
#, c-format #, c-format
msgid "Bank requested reserve (%1$s) for %2$s." msgid "Bank requested reserve (%1$s) for %2$s."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:344 #: src/webex/pages/popup.tsx:341
#, c-format #, c-format
msgid "Started to withdraw %1$s from %2$s (%3$s)." msgid "Started to withdraw %1$s from %2$s (%3$s)."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:353 #: src/webex/pages/popup.tsx:350
#, fuzzy, c-format #, fuzzy, c-format
msgid "Merchant %1$s offered contract %2$s." msgid "Merchant %1$s offered contract %2$s."
msgstr "Säljaren %1$s erbjöd kontrakt %2$s.\n" msgstr "Säljaren %1$s erbjöd kontrakt %2$s.\n"
#: src/webex/pages/popup.tsx:366 #: src/webex/pages/popup.tsx:363
#, c-format #, c-format
msgid "Withdrew %1$s from %2$s ( %3$s)." msgid "Withdrew %1$s from %2$s ( %3$s)."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:381 #: src/webex/pages/popup.tsx:378
#, c-format #, c-format
msgid "Paid %1$s to merchant %2$s.%3$s( %4$s)" msgid "Paid %1$s to merchant %2$s.%3$s( %4$s)"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:391 #: src/webex/pages/popup.tsx:388
#, fuzzy, c-format #, fuzzy, c-format
msgid "Merchant %1$s gave a refund over %2$s." msgid "Merchant %1$s gave a refund over %2$s."
msgstr "Säljaren %1$sgav en återbetalning på %2$s.\n" msgstr "Säljaren %1$sgav en återbetalning på %2$s.\n"
#: src/webex/pages/popup.tsx:404 #: src/webex/pages/popup.tsx:400
#, c-format #, c-format
msgid "tip" msgid "tip"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:408 #: src/webex/pages/popup.tsx:404
#, fuzzy, c-format #, fuzzy, c-format
msgid "Merchant %1$s gave a %2$s of %3$s." msgid "Merchant %1$s gave a %2$s of %3$s."
msgstr "Säljaren %1$sgav en återbetalning på %2$s.\n" msgstr "Säljaren %1$sgav en återbetalning på %2$s.\n"
#: src/webex/pages/popup.tsx:414 #: src/webex/pages/popup.tsx:410
#, c-format #, c-format
msgid "You did not accept the tip yet." msgid "You did not accept the tip yet."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:422 #: src/webex/pages/popup.tsx:418
#, c-format #, c-format
msgid "Unknown event (%1$s)" msgid "Unknown event (%1$s)"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:464 #: src/webex/pages/popup.tsx:460
#, c-format #, c-format
msgid "Error: could not retrieve event history" msgid "Error: could not retrieve event history"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:489 #: src/webex/pages/popup.tsx:485
#, c-format #, c-format
msgid "Your wallet has no events recorded." msgid "Your wallet has no events recorded."
msgstr "plånboken" msgstr "plånboken"
@ -176,51 +196,51 @@ msgstr "Avbryt"
#. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-# #. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#
#. TODO:generic error reporting function or component. #. TODO:generic error reporting function or component.
#: src/webex/pages/tip.tsx:118 src/webex/pages/withdraw.tsx:216 #: src/webex/pages/tip.tsx:116 src/webex/pages/withdraw.tsx:214
#, c-format #, c-format
msgid "Fatal error: \"%1$s\"." msgid "Fatal error: \"%1$s\"."
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:73 #: src/webex/pages/withdraw.tsx:72
#, c-format #, c-format
msgid "Could not get details for withdraw operation:" msgid "Could not get details for withdraw operation:"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:89 src/webex/pages/withdraw.tsx:179 #: src/webex/pages/withdraw.tsx:88 src/webex/pages/withdraw.tsx:178
#, fuzzy, c-format #, fuzzy, c-format
msgid "Chose different exchange provider" msgid "Chose different exchange provider"
msgstr "Ändra tjänsteleverantörer" msgstr "Ändra tjänsteleverantörer"
#: src/webex/pages/withdraw.tsx:108 #: src/webex/pages/withdraw.tsx:107
#, c-format #, c-format
msgid "" msgid ""
"Please select an exchange. You can review the details before after your " "Please select an exchange. You can review the details before after your "
"selection." "selection."
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:120 #: src/webex/pages/withdraw.tsx:119
#, fuzzy, c-format #, fuzzy, c-format
msgid "Select %1$s" msgid "Select %1$s"
msgstr "Välj %1$s" msgstr "Välj %1$s"
#: src/webex/pages/withdraw.tsx:142 #: src/webex/pages/withdraw.tsx:141
#, c-format #, c-format
msgid "Select custom exchange" msgid "Select custom exchange"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:159 #: src/webex/pages/withdraw.tsx:158
#, fuzzy, c-format #, fuzzy, c-format
msgid "You are about to withdraw %1$s from your bank account into your wallet." msgid "You are about to withdraw %1$s from your bank account into your wallet."
msgstr "" msgstr ""
"Du är på väg att ta ut\n" "Du är på väg att ta ut\n"
" %1$s från ditt bankkonto till din plånbok.\n" " %1$s från ditt bankkonto till din plånbok.\n"
#: src/webex/pages/withdraw.tsx:170 #: src/webex/pages/withdraw.tsx:169
#, c-format #, c-format
msgid "Accept fees and withdraw" msgid "Accept fees and withdraw"
msgstr "Acceptera avgifter och utbetala" msgstr "Acceptera avgifter och utbetala"
#: src/webex/pages/withdraw.tsx:188 #: src/webex/pages/withdraw.tsx:187
#, c-format #, c-format
msgid "Cancel withdraw operation" msgid "Cancel withdraw operation"
msgstr "" msgstr ""
@ -265,26 +285,6 @@ msgstr "Återhämtnings avgift"
msgid "Deposit Fee" msgid "Deposit Fee"
msgstr "Depostitions avgift" msgstr "Depostitions avgift"
#: src/wire.ts:38
#, c-format
msgid "Invalid Wire"
msgstr ""
#: src/wire.ts:43 src/wire.ts:46
#, c-format
msgid "Invalid Test Wire Detail"
msgstr ""
#: src/wire.ts:48
#, c-format
msgid "Test Wire Acct #%1$s on %2$s"
msgstr ""
#: src/wire.ts:50
#, fuzzy, c-format
msgid "Unknown Wire Detail"
msgstr "visa mer"
#, c-format #, c-format
#~ msgid "help" #~ msgid "help"
#~ msgstr "hjälp" #~ msgstr "hjälp"

View File

@ -27,6 +27,26 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/util/wire.ts:38
#, c-format
msgid "Invalid Wire"
msgstr ""
#: src/util/wire.ts:43 src/util/wire.ts:46
#, c-format
msgid "Invalid Test Wire Detail"
msgstr ""
#: src/util/wire.ts:48
#, c-format
msgid "Test Wire Acct #%1$s on %2$s"
msgstr ""
#: src/util/wire.ts:50
#, c-format
msgid "Unknown Wire Detail"
msgstr ""
#: src/webex/pages/benchmark.tsx:57 #: src/webex/pages/benchmark.tsx:57
#, c-format #, c-format
msgid "Operation" msgid "Operation"
@ -37,122 +57,122 @@ msgstr ""
msgid "time (ms/op)" msgid "time (ms/op)"
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:118 #: src/webex/pages/pay.tsx:117
#, c-format #, c-format
msgid "The merchant %1$s offers you to purchase:" msgid "The merchant %1$s offers you to purchase:"
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:124 #: src/webex/pages/pay.tsx:123
#, c-format #, c-format
msgid "The total price is %1$s (plus %2$s fees)." msgid "The total price is %1$s (plus %2$s fees)."
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:129 #: src/webex/pages/pay.tsx:128
#, c-format #, c-format
msgid "The total price is %1$s." msgid "The total price is %1$s."
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:149 #: src/webex/pages/pay.tsx:148
#, c-format #, c-format
msgid "Retry" msgid "Retry"
msgstr "" msgstr ""
#: src/webex/pages/pay.tsx:158 #: src/webex/pages/pay.tsx:157
#, c-format #, c-format
msgid "Confirm payment" msgid "Confirm payment"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:162 #: src/webex/pages/popup.tsx:159
#, c-format #, c-format
msgid "Balance" msgid "Balance"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:163 #: src/webex/pages/popup.tsx:160
#, c-format #, c-format
msgid "History" msgid "History"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:164 #: src/webex/pages/popup.tsx:161
#, c-format #, c-format
msgid "Debug" msgid "Debug"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:200 #: src/webex/pages/popup.tsx:197
#, c-format #, c-format
msgid "You have no balance to show. Need some %1$s getting started?" msgid "You have no balance to show. Need some %1$s getting started?"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:263 #: src/webex/pages/popup.tsx:260
#, c-format #, c-format
msgid "%1$s incoming" msgid "%1$s incoming"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:275 #: src/webex/pages/popup.tsx:272
#, c-format #, c-format
msgid "%1$s being spent" msgid "%1$s being spent"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:306 #: src/webex/pages/popup.tsx:303
#, c-format #, c-format
msgid "Error: could not retrieve balance information." msgid "Error: could not retrieve balance information."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:335 #: src/webex/pages/popup.tsx:332
#, c-format #, c-format
msgid "Bank requested reserve (%1$s) for %2$s." msgid "Bank requested reserve (%1$s) for %2$s."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:344 #: src/webex/pages/popup.tsx:341
#, c-format #, c-format
msgid "Started to withdraw %1$s from %2$s (%3$s)." msgid "Started to withdraw %1$s from %2$s (%3$s)."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:353 #: src/webex/pages/popup.tsx:350
#, c-format #, c-format
msgid "Merchant %1$s offered contract %2$s." msgid "Merchant %1$s offered contract %2$s."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:366 #: src/webex/pages/popup.tsx:363
#, c-format #, c-format
msgid "Withdrew %1$s from %2$s ( %3$s)." msgid "Withdrew %1$s from %2$s ( %3$s)."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:381 #: src/webex/pages/popup.tsx:378
#, c-format #, c-format
msgid "Paid %1$s to merchant %2$s.%3$s( %4$s)" msgid "Paid %1$s to merchant %2$s.%3$s( %4$s)"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:391 #: src/webex/pages/popup.tsx:388
#, c-format #, c-format
msgid "Merchant %1$s gave a refund over %2$s." msgid "Merchant %1$s gave a refund over %2$s."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:404 #: src/webex/pages/popup.tsx:400
#, c-format #, c-format
msgid "tip" msgid "tip"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:408 #: src/webex/pages/popup.tsx:404
#, c-format #, c-format
msgid "Merchant %1$s gave a %2$s of %3$s." msgid "Merchant %1$s gave a %2$s of %3$s."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:414 #: src/webex/pages/popup.tsx:410
#, c-format #, c-format
msgid "You did not accept the tip yet." msgid "You did not accept the tip yet."
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:422 #: src/webex/pages/popup.tsx:418
#, c-format #, c-format
msgid "Unknown event (%1$s)" msgid "Unknown event (%1$s)"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:464 #: src/webex/pages/popup.tsx:460
#, c-format #, c-format
msgid "Error: could not retrieve event history" msgid "Error: could not retrieve event history"
msgstr "" msgstr ""
#: src/webex/pages/popup.tsx:489 #: src/webex/pages/popup.tsx:485
#, c-format #, c-format
msgid "Your wallet has no events recorded." msgid "Your wallet has no events recorded."
msgstr "" msgstr ""
@ -174,49 +194,49 @@ msgstr ""
#. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-# #. #-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#
#. TODO:generic error reporting function or component. #. TODO:generic error reporting function or component.
#: src/webex/pages/tip.tsx:118 src/webex/pages/withdraw.tsx:216 #: src/webex/pages/tip.tsx:116 src/webex/pages/withdraw.tsx:214
#, c-format #, c-format
msgid "Fatal error: \"%1$s\"." msgid "Fatal error: \"%1$s\"."
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:73 #: src/webex/pages/withdraw.tsx:72
#, c-format #, c-format
msgid "Could not get details for withdraw operation:" msgid "Could not get details for withdraw operation:"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:89 src/webex/pages/withdraw.tsx:179 #: src/webex/pages/withdraw.tsx:88 src/webex/pages/withdraw.tsx:178
#, c-format #, c-format
msgid "Chose different exchange provider" msgid "Chose different exchange provider"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:108 #: src/webex/pages/withdraw.tsx:107
#, c-format #, c-format
msgid "" msgid ""
"Please select an exchange. You can review the details before after your " "Please select an exchange. You can review the details before after your "
"selection." "selection."
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:120 #: src/webex/pages/withdraw.tsx:119
#, c-format #, c-format
msgid "Select %1$s" msgid "Select %1$s"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:142 #: src/webex/pages/withdraw.tsx:141
#, c-format #, c-format
msgid "Select custom exchange" msgid "Select custom exchange"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:159 #: src/webex/pages/withdraw.tsx:158
#, c-format #, c-format
msgid "You are about to withdraw %1$s from your bank account into your wallet." msgid "You are about to withdraw %1$s from your bank account into your wallet."
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:170 #: src/webex/pages/withdraw.tsx:169
#, c-format #, c-format
msgid "Accept fees and withdraw" msgid "Accept fees and withdraw"
msgstr "" msgstr ""
#: src/webex/pages/withdraw.tsx:188 #: src/webex/pages/withdraw.tsx:187
#, c-format #, c-format
msgid "Cancel withdraw operation" msgid "Cancel withdraw operation"
msgstr "" msgstr ""
@ -260,23 +280,3 @@ msgstr ""
#, c-format #, c-format
msgid "Deposit Fee" msgid "Deposit Fee"
msgstr "" msgstr ""
#: src/wire.ts:38
#, c-format
msgid "Invalid Wire"
msgstr ""
#: src/wire.ts:43 src/wire.ts:46
#, c-format
msgid "Invalid Test Wire Detail"
msgstr ""
#: src/wire.ts:48
#, c-format
msgid "Test Wire Acct #%1$s on %2$s"
msgstr ""
#: src/wire.ts:50
#, c-format
msgid "Unknown Wire Detail"
msgstr ""

View File

@ -21,8 +21,8 @@ export interface MemoEntry<T> {
} }
export class AsyncOpMemo<T> { export class AsyncOpMemo<T> {
n = 0; private n = 0;
memo: { [k: string]: MemoEntry<T> } = {}; private memo: { [k: string]: MemoEntry<T> } = {};
put(key: string, p: Promise<T>): Promise<T> { put(key: string, p: Promise<T>): Promise<T> {
const n = this.n++; const n = this.n++;
this.memo[key] = { this.memo[key] = {

View File

@ -37,3 +37,24 @@ export function openPromise<T>(): OpenedPromise<T> {
} }
return { resolve, reject, promise }; return { resolve, reject, promise };
} }
export class AsyncCondition {
private _waitPromise: Promise<void>;
private _resolveWaitPromise: (val: void) => void;
constructor() {
const op = openPromise<void>();
this._waitPromise = op.promise;
this._resolveWaitPromise = op.resolve;
}
wait(): Promise<void> {
return this._waitPromise;
}
trigger(): void {
this._resolveWaitPromise();
const op = openPromise<void>();
this._waitPromise = op.promise;
this._resolveWaitPromise = op.resolve;
}
}

View File

@ -351,15 +351,32 @@ class TransactionHandle {
} }
} }
export function runWithReadTransaction<T>(
db: IDBDatabase,
stores: Store<any>[],
f: (t: TransactionHandle) => Promise<T>,
): Promise<T> {
return runWithTransaction<T>(db, stores, f, "readonly");
}
export function runWithWriteTransaction<T>( export function runWithWriteTransaction<T>(
db: IDBDatabase, db: IDBDatabase,
stores: Store<any>[], stores: Store<any>[],
f: (t: TransactionHandle) => Promise<T>, f: (t: TransactionHandle) => Promise<T>,
): Promise<T> {
return runWithTransaction<T>(db, stores, f, "readwrite");
}
function runWithTransaction<T>(
db: IDBDatabase,
stores: Store<any>[],
f: (t: TransactionHandle) => Promise<T>,
mode: "readonly" | "readwrite",
): Promise<T> { ): Promise<T> {
const stack = Error("Failed transaction was started here."); const stack = Error("Failed transaction was started here.");
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const storeName = stores.map(x => x.name); const storeName = stores.map(x => x.name);
const tx = db.transaction(storeName, "readwrite"); const tx = db.transaction(storeName, mode);
let funResult: any = undefined; let funResult: any = undefined;
let gotFunResult: boolean = false; let gotFunResult: boolean = false;
tx.oncomplete = () => { tx.oncomplete = () => {

View File

@ -105,6 +105,14 @@ export class TimerGroup {
} }
} }
resolveAfter(delayMs: number): Promise<void> {
return new Promise<void>((resolve, reject) => {
this.after(delayMs, () => {
resolve();
});
});
}
after(delayMs: number, callback: () => void): TimerHandle { after(delayMs: number, callback: () => void): TimerHandle {
if (this.stopped) { if (this.stopped) {
console.warn("dropping timer since timer group is stopped"); console.warn("dropping timer since timer group is stopped");

View File

@ -18,12 +18,10 @@
* Imports. * Imports.
*/ */
import { import {
HistoryQuery,
HistoryEvent,
WalletBalance, WalletBalance,
WalletBalanceEntry, WalletBalanceEntry,
} from "../walletTypes"; } from "../walletTypes";
import { oneShotIter, runWithWriteTransaction } from "../util/query"; import { runWithReadTransaction } from "../util/query";
import { InternalWalletState } from "./state"; import { InternalWalletState } from "./state";
import { Stores, TipRecord, CoinStatus } from "../dbTypes"; import { Stores, TipRecord, CoinStatus } from "../dbTypes";
import * as Amounts from "../util/amounts"; import * as Amounts from "../util/amounts";
@ -77,7 +75,7 @@ export async function getBalances(
byExchange: {}, byExchange: {},
}; };
await runWithWriteTransaction( await runWithReadTransaction(
ws.db, ws.db,
[Stores.coins, Stores.refresh, Stores.reserves, Stores.purchases], [Stores.coins, Stores.refresh, Stores.reserves, Stores.purchases],
async tx => { async tx => {

View File

@ -358,9 +358,14 @@ async function recordConfirmPay(
} }
function getNextUrl(contractTerms: ContractTerms): string { function getNextUrl(contractTerms: ContractTerms): string {
const f = contractTerms.fulfillment_url;
if (f.startsWith("http://") || f.startsWith("https://")) {
const fu = new URL(contractTerms.fulfillment_url) const fu = new URL(contractTerms.fulfillment_url)
fu.searchParams.set("order_id", contractTerms.order_id); fu.searchParams.set("order_id", contractTerms.order_id);
return fu.href; return fu.href;
} else {
return f;
}
} }
export async function abortFailedPayment( export async function abortFailedPayment(

View File

@ -14,18 +14,29 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/ */
/** /**
* Imports. * Imports.
*/ */
import { PendingOperationInfo, PendingOperationsResponse } from "../walletTypes"; import {
PendingOperationInfo,
PendingOperationsResponse,
getTimestampNow,
} from "../walletTypes";
import { oneShotIter } from "../util/query"; import { oneShotIter } from "../util/query";
import { InternalWalletState } from "./state"; import { InternalWalletState } from "./state";
import { Stores, ExchangeUpdateStatus, ReserveRecordStatus, CoinStatus, ProposalStatus } from "../dbTypes"; import {
Stores,
ExchangeUpdateStatus,
ReserveRecordStatus,
CoinStatus,
ProposalStatus,
} from "../dbTypes";
export async function getPendingOperations( export async function getPendingOperations(
ws: InternalWalletState, ws: InternalWalletState,
): Promise<PendingOperationsResponse> { ): Promise<PendingOperationsResponse> {
const pendingOperations: PendingOperationInfo[] = []; const pendingOperations: PendingOperationInfo[] = [];
let minRetryDurationMs = 5000;
const exchanges = await oneShotIter(ws.db, Stores.exchanges).toArray(); const exchanges = await oneShotIter(ws.db, Stores.exchanges).toArray();
for (let e of exchanges) { for (let e of exchanges) {
switch (e.updateStatus) { switch (e.updateStatus) {
@ -92,9 +103,8 @@ export async function getPendingOperations(
} }
} }
await oneShotIter(ws.db, Stores.reserves).forEach(reserve => { await oneShotIter(ws.db, Stores.reserves).forEach(reserve => {
const reserveType = reserve.bankWithdrawStatusUrl const reserveType = reserve.bankWithdrawStatusUrl ? "taler-bank" : "manual";
? "taler-bank" const now = getTimestampNow();
: "manual";
switch (reserve.reserveStatus) { switch (reserve.reserveStatus) {
case ReserveRecordStatus.DORMANT: case ReserveRecordStatus.DORMANT:
// nothing to report as pending // nothing to report as pending
@ -110,6 +120,11 @@ export async function getPendingOperations(
reserveType, reserveType,
reservePub: reserve.reservePub, reservePub: reserve.reservePub,
}); });
if (reserve.created.t_ms < now.t_ms - 5000) {
minRetryDurationMs = 500;
} else if (reserve.created.t_ms < now.t_ms - 30000) {
minRetryDurationMs = 2000;
}
break; break;
case ReserveRecordStatus.WAIT_CONFIRM_BANK: case ReserveRecordStatus.WAIT_CONFIRM_BANK:
pendingOperations.push({ pendingOperations.push({
@ -120,6 +135,11 @@ export async function getPendingOperations(
reservePub: reserve.reservePub, reservePub: reserve.reservePub,
bankWithdrawConfirmUrl: reserve.bankWithdrawConfirmUrl, bankWithdrawConfirmUrl: reserve.bankWithdrawConfirmUrl,
}); });
if (reserve.created.t_ms < now.t_ms - 5000) {
minRetryDurationMs = 500;
} else if (reserve.created.t_ms < now.t_ms - 30000) {
minRetryDurationMs = 2000;
}
break; break;
default: default:
pendingOperations.push({ pendingOperations.push({
@ -164,10 +184,7 @@ export async function getPendingOperations(
}); });
await oneShotIter(ws.db, Stores.withdrawalSession).forEach(ws => { await oneShotIter(ws.db, Stores.withdrawalSession).forEach(ws => {
const numCoinsWithdrawn = ws.withdrawn.reduce( const numCoinsWithdrawn = ws.withdrawn.reduce((a, x) => a + (x ? 1 : 0), 0);
(a, x) => a + (x ? 1 : 0),
0,
);
const numCoinsTotal = ws.withdrawn.length; const numCoinsTotal = ws.withdrawn.length;
if (numCoinsWithdrawn < numCoinsTotal) { if (numCoinsWithdrawn < numCoinsTotal) {
pendingOperations.push({ pendingOperations.push({
@ -204,5 +221,8 @@ export async function getPendingOperations(
return { return {
pendingOperations, pendingOperations,
nextRetryDelay: {
d_ms: minRetryDurationMs,
},
}; };
} }

View File

@ -105,6 +105,7 @@ export async function createReserve(
const exchangeInfo = await updateExchangeFromUrl(ws, req.exchange); const exchangeInfo = await updateExchangeFromUrl(ws, req.exchange);
const exchangeDetails = exchangeInfo.details; const exchangeDetails = exchangeInfo.details;
if (!exchangeDetails) { if (!exchangeDetails) {
console.log(exchangeDetails);
throw Error("exchange not updated"); throw Error("exchange not updated");
} }
const { isAudited, isTrusted } = await getExchangeTrust(ws, exchangeInfo); const { isAudited, isTrusted } = await getExchangeTrust(ws, exchangeInfo);

View File

@ -29,4 +29,5 @@ export interface InternalWalletState {
speculativePayData: SpeculativePayData | undefined; speculativePayData: SpeculativePayData | undefined;
cachedNextUrl: { [fulfillmentUrl: string]: NextUrlResult }; cachedNextUrl: { [fulfillmentUrl: string]: NextUrlResult };
memoProcessReserve: AsyncOpMemo<void>; memoProcessReserve: AsyncOpMemo<void>;
memoMakePlanchet: AsyncOpMemo<void>;
} }

View File

@ -189,7 +189,6 @@ async function processPlanchet(
return; return;
} }
if (withdrawalSession.source.type === "reserve") { if (withdrawalSession.source.type === "reserve") {
} }
const planchet = withdrawalSession.planchets[coinIdx]; const planchet = withdrawalSession.planchets[coinIdx];
if (!planchet) { if (!planchet) {
@ -251,10 +250,7 @@ async function processPlanchet(
ws.db, ws.db,
[Stores.coins, Stores.withdrawalSession, Stores.reserves], [Stores.coins, Stores.withdrawalSession, Stores.reserves],
async tx => { async tx => {
const ws = await tx.get( const ws = await tx.get(Stores.withdrawalSession, withdrawalSessionId);
Stores.withdrawalSession,
withdrawalSessionId,
);
if (!ws) { if (!ws) {
return; return;
} }
@ -350,41 +346,24 @@ export async function getVerifiedWithdrawDenomList(
return selectedDenoms; return selectedDenoms;
} }
async function processWithdrawCoin( async function makePlanchet(
ws: InternalWalletState, ws: InternalWalletState,
withdrawalSessionId: string, withdrawalSessionId: string,
coinIndex: number, coinIndex: number,
) { ): Promise<void> {
logger.info("starting withdraw for coin");
const withdrawalSession = await oneShotGet( const withdrawalSession = await oneShotGet(
ws.db, ws.db,
Stores.withdrawalSession, Stores.withdrawalSession,
withdrawalSessionId, withdrawalSessionId,
); );
if (!withdrawalSession) { if (!withdrawalSession) {
console.log("ws doesn't exist");
return; return;
} }
const coin = await oneShotGetIndexed(
ws.db,
Stores.coins.byWithdrawalWithIdx,
[withdrawalSessionId, coinIndex],
);
if (coin) {
console.log("coin already exists");
return;
}
if (withdrawalSession.planchets[coinIndex]) {
return processPlanchet(ws, withdrawalSessionId, coinIndex);
} else {
const src = withdrawalSession.source; const src = withdrawalSession.source;
if (src.type !== "reserve") { if (src.type !== "reserve") {
throw Error("invalid state"); throw Error("invalid state");
} }
const reserve = await oneShotGet(ws.db, Stores.reserves, src.reservePub) const reserve = await oneShotGet(ws.db, Stores.reserves, src.reservePub);
if (!reserve) { if (!reserve) {
return; return;
} }
@ -414,14 +393,8 @@ async function processWithdrawCoin(
reservePub: r.reservePub, reservePub: r.reservePub,
withdrawSig: r.withdrawSig, withdrawSig: r.withdrawSig,
}; };
await runWithWriteTransaction( await runWithWriteTransaction(ws.db, [Stores.withdrawalSession], async tx => {
ws.db, const myWs = await tx.get(Stores.withdrawalSession, withdrawalSessionId);
[Stores.withdrawalSession],
async tx => {
const myWs = await tx.get(
Stores.withdrawalSession,
withdrawalSessionId,
);
if (!myWs) { if (!myWs) {
return; return;
} }
@ -430,10 +403,53 @@ async function processWithdrawCoin(
} }
myWs.planchets[coinIndex] = newPlanchet; myWs.planchets[coinIndex] = newPlanchet;
await tx.put(Stores.withdrawalSession, myWs); await tx.put(Stores.withdrawalSession, myWs);
}, });
}
async function processWithdrawCoin(
ws: InternalWalletState,
withdrawalSessionId: string,
coinIndex: number,
) {
logger.trace("starting withdraw for coin", coinIndex);
const withdrawalSession = await oneShotGet(
ws.db,
Stores.withdrawalSession,
withdrawalSessionId,
); );
await processPlanchet(ws, withdrawalSessionId, coinIndex); if (!withdrawalSession) {
console.log("ws doesn't exist");
return;
} }
const coin = await oneShotGetIndexed(
ws.db,
Stores.coins.byWithdrawalWithIdx,
[withdrawalSessionId, coinIndex],
);
if (coin) {
console.log("coin already exists");
return;
}
if (!withdrawalSession.planchets[coinIndex]) {
logger.trace("creating planchet for coin", coinIndex);
const key = `${withdrawalSessionId}-${coinIndex}`;
const p = ws.memoMakePlanchet.find(key);
if (p) {
await p;
} else {
ws.memoMakePlanchet.put(
key,
makePlanchet(ws, withdrawalSessionId, coinIndex),
);
}
await makePlanchet(ws, withdrawalSessionId, coinIndex);
logger.trace("done creating planchet for coin", coinIndex);
}
await processPlanchet(ws, withdrawalSessionId, coinIndex);
logger.trace("starting withdraw for coin", coinIndex);
} }
export async function processWithdrawSession( export async function processWithdrawSession(

View File

@ -46,7 +46,6 @@ import {
abortFailedPayment, abortFailedPayment,
preparePay, preparePay,
confirmPay, confirmPay,
SpeculativePayData,
} from "./wallet-impl/pay"; } from "./wallet-impl/pay";
import { import {
@ -55,7 +54,6 @@ import {
CurrencyRecord, CurrencyRecord,
DenominationRecord, DenominationRecord,
ExchangeRecord, ExchangeRecord,
PlanchetRecord,
ProposalRecord, ProposalRecord,
PurchaseRecord, PurchaseRecord,
ReserveRecord, ReserveRecord,
@ -107,9 +105,11 @@ import { processWithdrawSession } from "./wallet-impl/withdraw";
import { getHistory } from "./wallet-impl/history"; import { getHistory } from "./wallet-impl/history";
import { getPendingOperations } from "./wallet-impl/pending"; import { getPendingOperations } from "./wallet-impl/pending";
import { getBalances } from "./wallet-impl/balance"; import { getBalances } from "./wallet-impl/balance";
import { acceptTip, getTipStatus } from "./wallet-impl/tip"; import { acceptTip, getTipStatus, processTip } from "./wallet-impl/tip";
import { returnCoins } from "./wallet-impl/return"; import { returnCoins } from "./wallet-impl/return";
import { payback } from "./wallet-impl/payback"; import { payback } from "./wallet-impl/payback";
import { TimerGroup } from "./util/timer";
import { AsyncCondition } from "./util/promiseUtils";
/** /**
* Wallet protocol version spoken with the exchange * Wallet protocol version spoken with the exchange
@ -155,6 +155,9 @@ const logger = new Logger("wallet.ts");
*/ */
export class Wallet { export class Wallet {
private ws: InternalWalletState; private ws: InternalWalletState;
private timerGroup: TimerGroup = new TimerGroup();
private latch = new AsyncCondition();
private stopped: boolean = false;
get db(): IDBDatabase { get db(): IDBDatabase {
return this.ws.db; return this.ws.db;
@ -188,6 +191,7 @@ export class Wallet {
notifier, notifier,
speculativePayData: undefined, speculativePayData: undefined,
memoProcessReserve: new AsyncOpMemo<void>(), memoProcessReserve: new AsyncOpMemo<void>(),
memoMakePlanchet: new AsyncOpMemo<void>(),
}; };
} }
@ -195,7 +199,6 @@ export class Wallet {
return getExchangePaytoUri(this.ws, exchangeBaseUrl, supportedTargetTypes); return getExchangePaytoUri(this.ws, exchangeBaseUrl, supportedTargetTypes);
} }
getWithdrawDetailsForAmount(baseUrl: any, amount: AmountJson): any { getWithdrawDetailsForAmount(baseUrl: any, amount: AmountJson): any {
return getWithdrawDetailsForAmount(this.ws, baseUrl, amount); return getWithdrawDetailsForAmount(this.ws, baseUrl, amount);
} }
@ -210,26 +213,26 @@ export class Wallet {
case "bug": case "bug":
return; return;
case "dirty-coin": case "dirty-coin":
await this.refresh(pending.coinPub); await refresh(this.ws, pending.coinPub);
break; break;
case "exchange-update": case "exchange-update":
await this.updateExchangeFromUrl(pending.exchangeBaseUrl); await updateExchangeFromUrl(this.ws, pending.exchangeBaseUrl);
break;
case "planchet":
// Nothing to do, since the withdraw session will process the planchet
break; break;
case "refresh": case "refresh":
await this.processRefreshSession(pending.refreshSessionId); await processRefreshSession(this.ws, pending.refreshSessionId);
break; break;
case "reserve": case "reserve":
await this.processReserve(pending.reservePub); await processReserve(this.ws, pending.reservePub);
break; break;
case "withdraw": case "withdraw":
await this.processWithdrawSession(pending.withdrawSessionId); await processWithdrawSession(this.ws, pending.withdrawSessionId);
break; break;
case "proposal": case "proposal":
// Nothing to do, user needs to accept/reject // Nothing to do, user needs to accept/reject
break; break;
case "tip":
await processTip(this.ws, pending.tipId);
break;
default: default:
assertUnreachable(pending); assertUnreachable(pending);
} }
@ -253,8 +256,22 @@ export class Wallet {
* Process pending operations and wait for scheduled operations in * Process pending operations and wait for scheduled operations in
* a loop until the wallet is stopped explicitly. * a loop until the wallet is stopped explicitly.
*/ */
public async runUntilStopped(): Promise<void> { public async runLoopScheduledRetries(): Promise<void> {
throw Error("not implemented"); while (!this.stopped) {
console.log("running wallet retry loop iteration");
let pending = await this.getPendingOperations();
console.log("waiting for", pending.nextRetryDelay);
const timeout = this.timerGroup.resolveAfter(pending.nextRetryDelay.d_ms);
await Promise.race([timeout, this.latch.wait()]);
pending = await this.getPendingOperations();
for (const p of pending.pendingOperations) {
try {
this.processOnePendingOperation(p);
} catch (e) {
console.error(e);
}
}
}
} }
/** /**
@ -267,9 +284,12 @@ export class Wallet {
const allPending = r.pendingOperations; const allPending = r.pendingOperations;
const relevantPending = allPending.filter(x => { const relevantPending = allPending.filter(x => {
switch (x.type) { switch (x.type) {
case "planchet":
case "reserve": case "reserve":
return x.reservePub === reservePub; return x.reservePub === reservePub;
case "withdraw":
return (
x.source.type === "reserve" && x.source.reservePub === reservePub
);
default: default:
return false; return false;
} }
@ -347,7 +367,11 @@ export class Wallet {
proposalId: string, proposalId: string,
sessionIdOverride: string | undefined, sessionIdOverride: string | undefined,
): Promise<ConfirmPayResult> { ): Promise<ConfirmPayResult> {
return confirmPay(this.ws, proposalId, sessionIdOverride); try {
return await confirmPay(this.ws, proposalId, sessionIdOverride);
} finally {
this.latch.trigger();
}
} }
/** /**
@ -358,7 +382,11 @@ export class Wallet {
* state DORMANT. * state DORMANT.
*/ */
async processReserve(reservePub: string): Promise<void> { async processReserve(reservePub: string): Promise<void> {
return processReserve(this.ws, reservePub); try {
return await processReserve(this.ws, reservePub);
} finally {
this.latch.trigger();
}
} }
/** /**
@ -370,7 +398,11 @@ export class Wallet {
async createReserve( async createReserve(
req: CreateReserveRequest, req: CreateReserveRequest,
): Promise<CreateReserveResponse> { ): Promise<CreateReserveResponse> {
try {
return createReserve(this.ws, req); return createReserve(this.ws, req);
} finally {
this.latch.trigger();
}
} }
/** /**
@ -383,14 +415,13 @@ export class Wallet {
* an unconfirmed reserve should be hidden. * an unconfirmed reserve should be hidden.
*/ */
async confirmReserve(req: ConfirmReserveRequest): Promise<void> { async confirmReserve(req: ConfirmReserveRequest): Promise<void> {
try {
return confirmReserve(this.ws, req); return confirmReserve(this.ws, req);
} finally {
this.latch.trigger();
}
} }
private async processWithdrawSession(
withdrawalSessionId: string,
): Promise<void> {
return processWithdrawSession(this.ws, withdrawalSessionId);
}
/** /**
* Check if and how an exchange is trusted and/or audited. * Check if and how an exchange is trusted and/or audited.
@ -435,10 +466,6 @@ export class Wallet {
return refresh(this.ws, oldCoinPub, force); return refresh(this.ws, oldCoinPub, force);
} }
async processRefreshSession(refreshSessionId: string) {
return processRefreshSession(this.ws, refreshSessionId);
}
async findExchange( async findExchange(
exchangeBaseUrl: string, exchangeBaseUrl: string,
): Promise<ExchangeRecord | undefined> { ): Promise<ExchangeRecord | undefined> {
@ -516,7 +543,8 @@ export class Wallet {
* Stop ongoing processing. * Stop ongoing processing.
*/ */
stop() { stop() {
//this.timerGroup.stopCurrentAndFutureTimers(); this.stopped = true;
this.timerGroup.stopCurrentAndFutureTimers();
this.cryptoApi.stop(); this.cryptoApi.stop();
} }

View File

@ -609,6 +609,7 @@ export type PendingOperationInfo =
export interface PendingOperationsResponse { export interface PendingOperationsResponse {
pendingOperations: PendingOperationInfo[]; pendingOperations: PendingOperationInfo[];
nextRetryDelay: Duration;
} }
export interface HistoryQuery { export interface HistoryQuery {

View File

@ -467,6 +467,9 @@ async function reinitWallet() {
notifier, notifier,
new BrowserCryptoWorkerFactory(), new BrowserCryptoWorkerFactory(),
); );
wallet.runLoopScheduledRetries().catch((e) => {
console.log("error during wallet retry loop", e);
});
// Useful for debugging in the background page. // Useful for debugging in the background page.
(window as any).talerWallet = wallet; (window as any).talerWallet = wallet;
currentWallet = wallet; currentWallet = wallet;