Sample State - maxbildner/coinspace GitHub Wiki
Sample State
store.getState() = {
entities: {
users: {
1: {
id: 1,
email: '[email protected]',
portfolio: {BTC:1}, // 1 corresponds to quantity of cryptocurrency in users portfolio
watchlist: [ 1, 2 ],
transactions: [ {quantity:1, price:8143, transaction_type:'BUY', created_at:2019-10-22, currency_symbol:'BTC'}, {}, ... ],
cash_balance: 10000.00
}
},
cryptocurrencies: {
1: {
id: 1,
symbol: 'BTC',
currentPrice: 0.312,
changePct24HR: 4.1,
},
2: {
id: 2,
symbol: 'XRP',
currentPrice: 0.312,
changePct24HR: 4.1,
}
}
},
errors: {
login: ["Incorrect username and/or password"]
},
session: { currentUserId: 42 }
};