src/store/Chain.js
// Subscribe to the latest blocks.
Subscribe to the latest blocks.
Subscribe to the latest blocks .
async subscribe({ commit, getters }) {
      if (getters.getSubscription === null) {
        let subscription = await CatapultWebsocket.subscribeNewBlock(commit, CatapultHttp.websocketUrl)
        commit('mutate', {key: 'subscription', value: subscription})
      }
    }
async subscribe ( { commit , getters } ) { if ( getters . getSubscription === null ) { let subscription = await CatapultWebsocket . subscribeNewBlock ( commit , CatapultHttp . websocketUrl ) commit ( 'mutate' , { key : 'subscription' , value : subscription } ) } }
Subscribe to the latest blocks.
Subscribe to the latest blocks .