aboutsummaryrefslogtreecommitdiff
path: root/extension/background/wallet.js
diff options
context:
space:
mode:
Diffstat (limited to 'extension/background/wallet.js')
-rw-r--r--extension/background/wallet.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/extension/background/wallet.js b/extension/background/wallet.js
index 971da7195..beb66c57a 100644
--- a/extension/background/wallet.js
+++ b/extension/background/wallet.js
@@ -13,6 +13,12 @@
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
*/
+/**
+ * High-level wallet operations that should be indepentent from the underlying
+ * browser extension interface.
+ * @module Wallet
+ * @author Florian Dold
+ */
/// <reference path="../decl/urijs/URIjs.d.ts" />
/// <reference path="../decl/chrome/chrome.d.ts" />
'use strict';
@@ -247,12 +253,13 @@ function confirmReserveHandler(db, detail, sendResponse) {
.then(() => {
// Do this in the background
updateMintFromUrl(db, reserveRecord.mint_base_url)
- .then((mint) => {
- updateReserve(db, reservePub, mint)
- .then((reserve) => depleteReserve(db, reserve, mint));
- });
+ .then((mint) => updateReserve(db, reservePub, mint)
+ .then((reserve) => depleteReserve(db, reserve, mint)));
return resp;
});
+ })
+ .then((resp) => {
+ sendResponse(resp);
});
// Allow async response
return true;