scpx-wallet
Version:
Scoop Core Wallet: dual-signature timelock crypto wallet - multi-asset, cross-platform and open-source
24 lines (14 loc) • 573 B
JavaScript
// Distributed under AGPLv3 license: see /LICENSE for terms. Copyright 2019-2021 Dominic Morris.
const _ = require('lodash')
const { createReducer } = require('./utils')
const { SET_ASSET_BLOCK_INFO } = require('../actions')
const initialState = {}
const handlers = {
[SET_ASSET_BLOCK_INFO]: (state, action) => {
// update syncinfo for asset
var newState = _.cloneDeep(state)
newState[action.payload.symbol] = action.payload
return newState
},
}
module.exports = createReducer(initialState, handlers)