Offers.buyOffer = (_id, type, _quantity, _token) => {
  const quantityAbsolute = convertToTokenPrecision(_quantity, _token);

  Offers.fillOfferGasEstimate(_id, quantityAbsolute).then((estimated) => {
    Offers.update(_id, { $unset: { helper: '' } });
    const estimatedGas = Math.min(estimated.quantity + 500000, estimated.limit);
    Dapple['maker-otc'].objects.otc.buy(_id, quantityAbsolute, { gas: estimatedGas }, (error, tx) => {
      if (!error) {
        Transactions.add('offer', tx, { id: _id, status: Status.BOUGHT });
        Offers.update(_id, {
          $set: {
            tx, status: Status.BOUGHT, helper: `Your ${type} order is being processed...`,
          },
        });
      } else {
        Offers.update(_id, { $set: { helper: formatError(error) } });
      }
    });
  });
};