State Shape - mstephan520/coinplace GitHub Wiki
{
entities: {
followList: {
1: {
coinId: 1,
},
2: {
coinId: 2,
},
3: {
coinId: 3,
}
},
coins: {
1: {
coinId: 1,
name: 'Bitcoin',
symbol: 'BTC',
price: 8700.00, // coming from external API
change: 0.50%, // coming from external API
},
2: {
id: 2,
coin_id: 2,
name: 'Ethereum',
symbol: 'ETH',
price: 270.50, // coming from external API
change: 2.50%, // coming from external API
}
},
Portfolio: {
1: {
coin_id: 4,
},
2: {
coin_id: 5,
},
3: {
coin_id: 6,
},
}
Trades: {
1: {
coin_id: 1,
quantity: .5,
price: 7000.00,
user_id: 1
type: 'buy'
},
2: {
coin_id: 1,
quantity: .5,
price: 7000.00,
user_id: 1
type: 'sell'
}
}
},
ui: {
loading: true/false
},
errors: {
login: ["Email or password is incorrect"],
},
session: { userId: 10 }
}