(price, currency)
| 381 | } |
| 382 | |
| 383 | const getPriceInUsd = (price, currency) => { |
| 384 | if (!currency) { return price } |
| 385 | const exchangeVal = this.exchangeRate[currency] |
| 386 | if (!exchangeVal) { |
| 387 | console.log('no converter for currency', currency) |
| 388 | return price |
| 389 | } |
| 390 | return parseInt(price / exchangeVal, 10) |
| 391 | } |
| 392 | |
| 393 | // Organize data by day, then group |
| 394 | const groupMap = {} |