Browse Source

Only render latest 6 blocks in DOM (#253)

0.3.15
Edd Williams 4 years ago
committed by GitHub
parent
commit
dece008d22
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/store/modules/bitcoin.js

3
src/store/modules/bitcoin.js

@ -118,7 +118,8 @@ const mutations = {
const mergedBlocks = [...blocks, ...state.blocks];
// remove duplicate blocks
const uniqueBlocks = mergedBlocks.filter((v, i, a) => a.findIndex(t => (t.height === v.height)) === i);
state.blocks = uniqueBlocks;
// limit to latest 6 blocks
state.blocks = [...uniqueBlocks.slice(0, 6)];
},
setVersion(state, version) {

Loading…
Cancel
Save