Edd Williams
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
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) { |
|
|
|