           .then (objectCryptoService) =>
             encryptedSharingPair = sharedObject.encryptedSharingPair
             decryptedSharingPair = objectCryptoService.decryptToUint8Array(encryptedSharingPair)
-            objectIndexPair      = @engine.getObjectIndexPairFromObjectSharingPair(decryptedSharingPair)
+            objectIndexPair = @engine.getObjectIndexPairFromObjectSharingPair(decryptedSharingPair)
             @sharingApi.addIndexPair(objectId, objectIndexPair)
         )
       .catch (e) ->

          sharingPair : encryptedObjectSharingPair
        })
        @sharingApi.shareObject(sharingRequest)

        return undefined

      .catch (e) ->
        # DOTO - how do we handle failure when sharing an object?
        log.error('failed to share object', e)


      { principal } = @credentialLoader.getCredentials()

      Promise.join(
        @sharingApi.getObjectIndexPair(objectId),
        @cryptoServiceLoader.getObjectCryptoService(objectId),
        @directoryApi.batchGetRsaPublicKeys(uuids),
        (objectIndexPair, objectCryptoService, uuidsToRsaPublicKeys) ->

        # create the object sharing pair from the object index pair, and encrypt it
        objectSharingPair = @engine.getObjectSharingPairFromObjectIndexPair(objectIndexPair)
