message: Finish postmaster
diff: import { t } from 'i18next';
  import * as _ from 'lodash';
  -import { IPromise } from 'angular';
  import { dimItemService } from '../inventory/dimItemService.factory';
  import { StoreServiceType, DimStore } from '../inventory/store-types';
  import { DimItem } from '../inventory/item-types';
  import { InventoryBucket, InventoryBuckets } from '../inventory/inventory-buckets';
  import { toaster } from '../ngimport-more';
  -export function makeRoomForPostmaster(
  +export async function makeRoomForPostmaster(
  store: DimStore,
  toaster,
  - bucketsService: () => IPromise<InventoryBuckets>
  -): IPromise<void> {
  - return bucketsService().then((buckets) => {
  + bucketsService: () => Promise<InventoryBuckets>
  +): Promise<void> {
  + const buckets = await bucketsService();
  const postmasterItems: DimItem[] = _.flatMap(
  buckets.byCategory.Postmaster,
  (bucket: InventoryBucket) => store.buckets[bucket.id]
  );
  const postmasterItemCountsByType = _.countBy(postmasterItems, (i) => i.bucket.id);
  -
  // If any category is full, we'll move enough aside
  const itemsToMove: DimItem[] = [];
  _.each(postmasterItemCountsByType, (count, bucket) => {
  @@ -46,10 +44,9 @@ export function makeRoomForPostmaster(
  }
  }
  });
  -
  // TODO: it'd be nice if this were a loadout option
  - return moveItemsToVault(store.getStoresService(), store, itemsToMove, dimItemService)
  - .then(() => {
  + try {
  + await moveItemsToVault(store.getStoresService(), store, itemsToMove, dimItemService);
  toaster.pop(
  'success',
  t('Loadouts.MakeRoom'),
  @@ -60,16 +57,10 @@ export function makeRoomForPostmaster(
  context: store.gender
  })
  );
  - })
  - .catch((e) => {
  - toaster.pop(
  - 'error',
  - t('Loadouts.MakeRoom'),
  - t('Loadouts.MakeRoomError', { error: e.message })
  - );
  + } catch (e) {
  + toaster.pop('error', t('Loadouts.MakeRoom'), t('Loadouts.MakeRoomError', { error: e.message }));
  throw e;
  - }) as IPromise<void>;
  - });
  + }
  }
  // D2 only
  