Repository: CryptoBlades/cryptoblades
File: frontend/src/store.ts (TypeScript)

Code before:
        const t2Land = res[1];
        const t3Land = res[2];

        return { t1Land, t2Land, t3Land };
      },

      async getReservedChunksIds({state}) {
        const CBKLandSale = state.contracts().CBKLandSale!;

        return await CBKLandSale.methods
          .getReservedChunksIds()
          .call(defaultCallOptions(state));
      },

      async getPlayerReservedLand({state}) {
        const CBKLandSale = state.contracts().CBKLandSale!;
        if (!state.defaultAccount || !CBKLandSale) return;

        return await CBKLandSale.methods
          .getPlayerReservedLand(state.defaultAccount)
          .call(defaultCallOptions(state));
      },

      async isShieldPurchased({state}) {
        const Promos = state.contracts().Promos!;
        if (!state.defaultAccount || !Promos) return;

        return await Promos.methods
          .getBit(
            state.defaultAccount,
            parseInt(await Promos.methods.BIT_LEGENDARY_DEFENDER().call(defaultCallOptions(state)), 10))
          .call(defaultCallOptions(state));
      },

      async getChunksOfReservation({state}, {reservationId}) {
        const CBKLandSale = state.contracts().CBKLandSale!;

        return await CBKLandSale.methods
          .getChunksOfReservations(reservationId)
          .call(defaultCallOptions(state));
      },

      async getTakenT3Chunks({state}) {
        const CBKLandSale = state.contracts().CBKLandSale!;

        return await CBKLandSale.methods
          .getTakenT3Chunks()
          .call(defaultCallOptions(state));
      },

      async claimPlayerReservedLand({state}, {reservationId, chunkId, tier}) {

Review comment (suggestion):
Either use non-null assertion operator (**!**) on Promos or check if(!Promos), they both serve the same purpsoe here.

Code after:
        const t2Land = res[1];
        const t3Land = res[2];

        return { t1Land, t2Land, t3Land };
      },

      async getReservedChunksIds({state}) {
        const CBKLandSale = state.contracts().CBKLandSale!;

        return await CBKLandSale.methods
          .getReservedChunksIds()
          .call(defaultCallOptions(state));
      },

      async getPlayerReservedLand({state}) {
        const CBKLandSale = state.contracts().CBKLandSale!;
        if (!state.defaultAccount || !CBKLandSale) return;

        return await CBKLandSale.methods
          .getPlayerReservedLand(state.defaultAccount)
          .call(defaultCallOptions(state));
      },

      async isShieldPurchased({state}) {
        const { Promos } = state.contracts();
        if (!state.defaultAccount || !Promos) return;

        return await Promos.methods
          .getBit(
            state.defaultAccount,
            parseInt(await Promos.methods.BIT_LEGENDARY_DEFENDER().call(defaultCallOptions(state)), 10))
          .call(defaultCallOptions(state));
      },

      async getChunksOfReservation({state}, {reservationId}) {
        const CBKLandSale = state.contracts().CBKLandSale!;

        return await CBKLandSale.methods
          .getChunksOfReservations(reservationId)
          .call(defaultCallOptions(state));
      },

      async getTakenT3Chunks({state}) {
        const CBKLandSale = state.contracts().CBKLandSale!;

        return await CBKLandSale.methods
          .getTakenT3Chunks()
          .call(defaultCallOptions(state));
      },

      async claimPlayerReservedLand({state}, {reservationId, chunkId, tier}) {