tg-core-components 6.3.5 → 6.3.6-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,6 +44,7 @@ var List = function (_Component) {
44
44
  value: function render() {
45
45
  var _this2 = this;
46
46
 
47
+ console.log(this.props);
47
48
  return React.createElement(
48
49
  Fragment,
49
50
  null,
@@ -46,22 +46,13 @@ var BonusAction = function BonusAction(_ref) {
46
46
  return React.createElement(
47
47
  'div',
48
48
  { className: 'actions' },
49
- console.log(bonus.Identifier),
50
- console.log(bonus.Identifier, bonus),
51
- console.log(bonus.Identifier, ALEACC_BONUS_CLAIM_STATE.includes(bonus.State)),
52
- console.log('condition: ', bonus.Identifier, ALEACC_BONUS_CLAIM_STATE.includes(bonus.State) || bonus.Type === 'Deposit'),
53
49
  (ALEACC_BONUS_CLAIM_STATE.includes(bonus.State) || bonus.Type === 'Deposit') && React.createElement(
54
- 'div',
55
- null,
56
- console.log(bonus.Identifier, 'RENDER_BUTTON'),
57
- React.createElement(
58
- Button,
59
- {
60
- className: 'button primary small',
61
- onClick: claimBonus,
62
- isLoading: isLoadingClaim },
63
- React.createElement(Translate, { id: 'action.bonus.claim', defaultMessage: 'Claim' })
64
- )
50
+ Button,
51
+ {
52
+ className: 'button primary small',
53
+ onClick: claimBonus,
54
+ isLoading: isLoadingClaim },
55
+ React.createElement(Translate, { id: 'action.bonus.claim', defaultMessage: 'Claim' })
65
56
  ),
66
57
  ALEACC_BONUS_REJECT_STATE.includes(bonus.State) && React.createElement(
67
58
  Button,
@@ -48,6 +48,9 @@ var HistoryWidgetList = function (_React$Component) {
48
48
  }, _this.createListInfo = function (item, product, isLoading) {
49
49
  if (isLoading) return [[React.createElement(SkeletonLine, { bold: true }), React.createElement(SkeletonLine, null)], [React.createElement(SkeletonLine, { bold: true }), React.createElement(SkeletonLine, null)]];
50
50
 
51
+ // Odds is missing currency, use user currency as a fallback.
52
+ if (!item.Currency) item.Currency = _this.props.currency;
53
+
51
54
  if (product === 'casino') {
52
55
  return [[React.createElement(
53
56
  'div',
@@ -333,13 +336,15 @@ var HistoryWidget = function HistoryWidget(_ref2) {
333
336
  var getTransactions = _ref2.getTransactions,
334
337
  items = _ref2.items,
335
338
  products = _ref2.products,
336
- limit = _ref2.limit;
339
+ limit = _ref2.limit,
340
+ currency = _ref2.currency;
337
341
 
338
342
  var accordionItems = products.map(function (product) {
339
343
  return {
340
344
  header: getMessage(product),
341
345
  content: React.createElement(HistoryWidgetList, {
342
346
  product: product,
347
+ currency: currency,
343
348
  limit: limit,
344
349
  getTransactions: getTransactions[product],
345
350
  items: items[product]
@@ -60,6 +60,7 @@ var List = function (_Component) {
60
60
  value: function render() {
61
61
  var _this2 = this;
62
62
 
63
+ console.log(this.props);
63
64
  return _react2.default.createElement(
64
65
  _react.Fragment,
65
66
  null,
@@ -78,22 +78,13 @@ var BonusAction = function BonusAction(_ref) {
78
78
  return _react2.default.createElement(
79
79
  'div',
80
80
  { className: 'actions' },
81
- console.log(bonus.Identifier),
82
- console.log(bonus.Identifier, bonus),
83
- console.log(bonus.Identifier, ALEACC_BONUS_CLAIM_STATE.includes(bonus.State)),
84
- console.log('condition: ', bonus.Identifier, ALEACC_BONUS_CLAIM_STATE.includes(bonus.State) || bonus.Type === 'Deposit'),
85
81
  (ALEACC_BONUS_CLAIM_STATE.includes(bonus.State) || bonus.Type === 'Deposit') && _react2.default.createElement(
86
- 'div',
87
- null,
88
- console.log(bonus.Identifier, 'RENDER_BUTTON'),
89
- _react2.default.createElement(
90
- _Button2.default,
91
- {
92
- className: 'button primary small',
93
- onClick: claimBonus,
94
- isLoading: isLoadingClaim },
95
- _react2.default.createElement(_Translate2.default, { id: 'action.bonus.claim', defaultMessage: 'Claim' })
96
- )
82
+ _Button2.default,
83
+ {
84
+ className: 'button primary small',
85
+ onClick: claimBonus,
86
+ isLoading: isLoadingClaim },
87
+ _react2.default.createElement(_Translate2.default, { id: 'action.bonus.claim', defaultMessage: 'Claim' })
97
88
  ),
98
89
  ALEACC_BONUS_REJECT_STATE.includes(bonus.State) && _react2.default.createElement(
99
90
  _Button2.default,
@@ -83,6 +83,9 @@ var HistoryWidgetList = function (_React$Component) {
83
83
  }, _this.createListInfo = function (item, product, isLoading) {
84
84
  if (isLoading) return [[_react2.default.createElement(_Skeleton.SkeletonLine, { bold: true }), _react2.default.createElement(_Skeleton.SkeletonLine, null)], [_react2.default.createElement(_Skeleton.SkeletonLine, { bold: true }), _react2.default.createElement(_Skeleton.SkeletonLine, null)]];
85
85
 
86
+ // Odds is missing currency, use user currency as a fallback.
87
+ if (!item.Currency) item.Currency = _this.props.currency;
88
+
86
89
  if (product === 'casino') {
87
90
  return [[_react2.default.createElement(
88
91
  'div',
@@ -368,13 +371,15 @@ var HistoryWidget = function HistoryWidget(_ref2) {
368
371
  var getTransactions = _ref2.getTransactions,
369
372
  items = _ref2.items,
370
373
  products = _ref2.products,
371
- limit = _ref2.limit;
374
+ limit = _ref2.limit,
375
+ currency = _ref2.currency;
372
376
 
373
377
  var accordionItems = products.map(function (product) {
374
378
  return {
375
379
  header: (0, _message.getMessage)(product),
376
380
  content: _react2.default.createElement(HistoryWidgetList, {
377
381
  product: product,
382
+ currency: currency,
378
383
  limit: limit,
379
384
  getTransactions: getTransactions[product],
380
385
  items: items[product]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tg-core-components",
3
- "version": "6.3.5",
3
+ "version": "6.3.6-0",
4
4
  "description": "tg-core-components",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",