move more rpc calls into pinpad

This commit is contained in:
ansuz
2017-05-18 12:36:12 +02:00
parent 98828730b4
commit 7befaccd88
2 changed files with 49 additions and 0 deletions

View File

@@ -779,6 +779,21 @@ define([
common.getPinnedUsage(todo);
};
common.uploadComplete = function (cb) {
if (!pinsReady()) { return void cb('[RPC_NOT_READY]'); }
rpc.uploadComplete(cb);
};
common.uploadStatus = function (size, cb) {
if (!pinsReady()) { return void cb('[RPC_NOT_READY]'); }
rpc.uploadStatus(size, cb);
};
common.uploadCancel = function (cb) {
if (!pinsReady()) { return void cb('[RPC_NOT_READY]'); }
rpc.uploadCancel(cb);
};
var LIMIT_REFRESH_RATE = 30000; // milliseconds
common.createUsageBar = function (cb, alwaysDisplayUpgrade) {
var todo = function (err, state, data) {