diff options
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/transfers.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/transfers.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/transfers.js b/packages/meshbay-hub/src/meshbay_hub/static/transfers.js index 524b7f3..9a1455a 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/transfers.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/transfers.js @@ -290,6 +290,12 @@ export class TransferStore { return item.id; } + /** Resolves with a transfer's final status once it has ended, whatever the ending. */ + settled(id) { + const item = this._items.find((it) => it.id === id); + return item ? item.promise.then(() => item.status) : Promise.resolve('gone'); + } + _watchLease(item) { item.lease._onState = (lease) => { if (item.status !== 'queued' && item.status !== 'running') return; |