summaryrefslogtreecommitdiff
path: root/ui/app
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app')
-rw-r--r--ui/app/lib/bitmask.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/ui/app/lib/bitmask.js b/ui/app/lib/bitmask.js
index 9d77224..72c027c 100644
--- a/ui/app/lib/bitmask.js
+++ b/ui/app/lib/bitmask.js
@@ -359,11 +359,17 @@ var bitmask = function(){
* @param {string} address The email address of the key
* @param {boolean} priv Should get the private key?
* If it's not provided the public one will be fetched.
+ * @param {boolean} fetch If the key is not in keymanager, should we fetch it remotely.
+ * If it's not provided keys will not be fetched remotely
*
* @return {Promise<KeyObject>} The key
*/
- exprt: function(uid, address, priv) {
- return call(['keys', 'export', uid, address, private_str(priv)]);
+ exprt: function(uid, address, priv, fetch) {
+ var privstr = private_str(priv);
+ if ((typeof fetch === 'bool') && fetch) {
+ privstr = 'fetch';
+ }
+ return call(['keys', 'export', uid, address, privstr]);
},
/**