gatsby-core-theme 44.4.25 → 44.4.27

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ ## [44.4.27](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.26...v44.4.27) (2025-07-28)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add wallets data ([5338ab1](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/5338ab162c121e07c6622092a27060c8179d012d))
7
+ * fix tests ([ba15ed7](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/ba15ed7a960acb9a753c012fc90d048183ffdd6b))
8
+
9
+
10
+ * Merge branch 'tm-5662-crypto-wallets' into 'master' ([ed6aa81](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/ed6aa8168846c895d06bd3c00cd029efd445837b))
11
+ * Edit fetch.mjs ([49eb99c](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/49eb99c6ccde080643835ae2c96c8434b6f2cccd))
12
+
13
+ ## [44.4.26](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.25...v44.4.26) (2025-07-28)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * reply issue with checkboxes ([151a5a3](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/151a5a3f22d7b36657121c9060d0e543e1694134))
19
+
1
20
  ## [44.4.25](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.24...v44.4.25) (2025-07-25)
2
21
 
3
22
 
package/gatsby-node.mjs CHANGED
@@ -57,6 +57,7 @@ let ribbonsData = null;
57
57
  let operatorData = null;
58
58
  let cryptoExchangesData = null;
59
59
  let cryptoBrokersData = null;
60
+ let cryptoWalletsData = null;
60
61
  let countriesData = null;
61
62
  let paymentData = null;
62
63
  let allMarketPrefixes = [];
@@ -98,6 +99,7 @@ export const createPages = async (
98
99
  sports_data: sportsData,
99
100
  crypto_exchanges: cryptoExchangesData,
100
101
  crypto_brokers: cryptoBrokersData,
102
+ crypto_wallets: cryptoWalletsData,
101
103
  countries: countriesData,
102
104
  operators_license: licensesData,
103
105
  },
@@ -381,6 +383,7 @@ export const onPreBootstrap = async () => {
381
383
  countriesData,
382
384
  commentsData,
383
385
  licensesData,
386
+ cryptoWalletsData,
384
387
  } = await fetchSiteSettings(process.env.GATSBY_SITE_NAME));
385
388
  };
386
389
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "44.4.25",
3
+ "version": "44.4.27",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -26,20 +26,29 @@ const LeaveCommentForm = ({
26
26
  const formData = new FormData(form);
27
27
  const data = Object.fromEntries(formData.entries());
28
28
 
29
- if(data?.["g-recaptcha-response"] === '' || !data?.tnc) return;
30
- if(parentCommentID) data.parent_id = parentCommentID;
29
+ const cleanedData = isReply
30
+ ? Object.entries(data).reduce((acc, [key, value]) => {
31
+ if (key.startsWith('post_anonymously_')) acc.post_anonymously = value;
32
+ else if (key.startsWith('tnc_')) acc.tnc = value;
33
+ else acc[key] = value;
34
+ return acc;
35
+ }, {})
36
+ : data;
31
37
 
32
- data.reference_id = page?.id;
33
- data.site_id = parseInt(process.env.SITE_ID);
34
- data.rate = parseInt(data.rate);
38
+ if(cleanedData?.["g-recaptcha-response"] === '' || !cleanedData?.tnc) return;
39
+ if(parentCommentID) cleanedData.parent_id = parentCommentID;
35
40
 
36
- data.market_short_code = activeMarket;
41
+ cleanedData.reference_id = page?.id;
42
+ cleanedData.site_id = parseInt(process.env.SITE_ID);
43
+ cleanedData.rate = parseInt(data.rate);
44
+
45
+ cleanedData.market_short_code = activeMarket;
37
46
 
38
- if(!data?.post_anonymously) data.author_name = data?.name;
39
- if(!data?.rate) delete data?.rate;
47
+ if(!cleanedData?.post_anonymously) cleanedData.author_name = cleanedData?.name;
48
+ if(!cleanedData?.rate) delete cleanedData?.rate;
40
49
 
41
- delete data?.post_anonymously;
42
- delete data?.tnc;
50
+ delete cleanedData?.post_anonymously;
51
+ delete cleanedData?.tnc;
43
52
 
44
53
  const headers = {
45
54
  headers: {
@@ -50,7 +59,7 @@ const LeaveCommentForm = ({
50
59
 
51
60
  return new Promise((resolve, reject) => {
52
61
  axios
53
- .post('/api/post-comment', data, headers)
62
+ .post('/api/post-comment', cleanedData, headers)
54
63
  .then((response) => {
55
64
  response.ok = response.status === 200;
56
65
  if (response.ok) resetForm();
@@ -170,7 +170,7 @@ export const commentForm = {
170
170
  {
171
171
  id: 'tnc',
172
172
  label:
173
- 'By checking this box, I agree to the Comments [Link] and Terms and Conditions.',
173
+ 'By checking this box, I agree to the Comments Terms and Conditions.',
174
174
  link: {
175
175
  url: '/privacy-policy',
176
176
  text: 'Link',
@@ -231,7 +231,7 @@ export const replyForm = {
231
231
  required: true,
232
232
  },
233
233
  {
234
- id: 'post_anonymously',
234
+ id: `post_anonymously_${Math.floor(Math.random() * 1000000)}`,
235
235
  type: 'checkbox',
236
236
  required: false,
237
237
  switch: true,
@@ -239,7 +239,7 @@ export const replyForm = {
239
239
  twoCol: false,
240
240
  options: [
241
241
  {
242
- id: 'post_anonymously',
242
+ id: `post_anonymously_${Math.floor(Math.random() * 1000000)}`,
243
243
  label:
244
244
  'Post comment anonymously.',
245
245
  translationKey: 'post_anonymously_translation',
@@ -247,16 +247,16 @@ export const replyForm = {
247
247
  ],
248
248
  },
249
249
  {
250
- id: 'tnc',
250
+ id: `tnc_${Math.floor(Math.random() * 1000000)}`,
251
251
  type: 'checkbox',
252
252
  required: true,
253
253
  translationKey: 'checkbox_label',
254
254
  twoCol: false,
255
255
  options: [
256
256
  {
257
- id: 'tnc',
257
+ id: `tnc_${Math.floor(Math.random() * 1000000)}`,
258
258
  label:
259
- 'By checking this box, I agree to the Comments [Link] and Terms and Conditions.',
259
+ 'By checking this box, I agree to the Comments Terms and Conditions.',
260
260
  link: {
261
261
  url: '/privacy-policy',
262
262
  text: 'Link',
@@ -19,10 +19,10 @@ export function sanitizeCryptoData(data) {
19
19
 
20
20
  export function transformCryptosData(jsonData, relationsData) {
21
21
  const cryptos = {};
22
-
22
+ // TODO: After alpha implement the site data we need to do more logic here
23
23
  Object.values(jsonData).forEach(crypto => {
24
24
  const newCryptoData = {
25
- ...crypto,
25
+ ...crypto.general_data,
26
26
  }
27
27
 
28
28
  // OPERATOR LOGO (temp fix included and will be removed)
@@ -11,10 +11,10 @@ describe("Transform Cryptos Data", () => {
11
11
  const transformedCryptoExchanges = transformCryptosData(exchangesData, {payments: {}, currencies: getCurrenciesData(), countries: {}});
12
12
 
13
13
  // values before transforming
14
- expect(Object.values(exchangesData)[0].name).toBe('Crypto Exchange 1');
15
- expect(Object.values(exchangesData)[2].name).toBe('Crypto Exchange 3');
16
- expect(Object.values(exchangesData)[1].crypto_currencies.length).toBe(2);
17
- expect(Object.values(exchangesData)[1].crypto_currencies[0]).toBe(1);
14
+ expect(Object.values(transformedCryptoExchanges)[0].name).toBe('Crypto Exchange 1');
15
+ expect(Object.values(transformedCryptoExchanges)[2].name).toBe('Crypto Exchange 3');
16
+ expect(Object.values(transformedCryptoExchanges)[1].crypto_currencies.length).toBe(2);
17
+ expect(Object.values(transformedCryptoExchanges)[1].crypto_currencies[0].name).toBe('Bitcoin');
18
18
 
19
19
  // values after transforming
20
20
  expect(Object.values(transformedCryptoExchanges)[0].name).toBe('Crypto Exchange 1');
@@ -87,6 +87,12 @@ export const processRelations = (
87
87
  data.relations.crypto_brokers[page.relation_id];
88
88
  }
89
89
  break;
90
+ case "crypto_wallets":
91
+ if (!hasRelation) {
92
+ transformedPages[market][pageType][index].relation =
93
+ data.relations.crypto_wallets[page.relation_id];
94
+ }
95
+ break;
90
96
  default:
91
97
  break;
92
98
  }
@@ -161,6 +161,12 @@ export const fetchSiteSettings = async (siteName, previewPath = null) => {
161
161
  payments: paymentData,
162
162
  })
163
163
 
164
+ const cryptoWalletsData = transformCryptosData(cryptoWallets, {
165
+ countries: countriesData,
166
+ currencies: currenciesData,
167
+ payments: paymentData,
168
+ })
169
+
164
170
 
165
171
  if (["rage_seo", "rage_ppc", "sports"].includes(siteSettingsData.general[siteId].type)) {
166
172
  const teamIds = Object.values(sportsData.teams).map((team) => String(team.livegoals_v2_id));
@@ -192,6 +198,7 @@ export const fetchSiteSettings = async (siteName, previewPath = null) => {
192
198
  sportsData,
193
199
  cryptoExchangesData,
194
200
  cryptoBrokersData,
201
+ cryptoWalletsData,
195
202
  commentsData,
196
203
  licensesData
197
204
  };
@@ -1,65 +1,69 @@
1
1
  export const getDefaultCryptoExchangesProps = (index = 1) => ({
2
- id: index,
3
- name: `Crypto Exchange ${index}`,
4
- short_name: `crypto_exchange_${index}`,
5
- founded: "2022-11-01 00:00:00",
6
- headquarters: `Headquarters ${index}`,
7
- best_for: "Selling",
8
- url: "http://google.com/test222",
9
- markets_amount: "3000 +",
10
- currencies_amount: "3 including 25+",
11
- rating_security: 1,
12
- rating_fees: 3,
13
- rating_usability: 3,
14
- rating_features: 3,
15
- rating_support: 3,
16
- rating_average: 2.6,
17
- exchange_type: "Decentralized",
18
- crypto_currencies: [
19
- 1,
20
- 2
21
- ],
22
- fiat_currencies: [
23
- 3,
24
- 9
25
- ],
26
- restricted_countries: [
27
- 1,
28
- 254
29
- ],
30
- selling_points: [
31
- "800games",
32
- "1000_games"
33
- ],
34
- services: [
35
- {
36
- name: "g test",
37
- short_name: "crypto_services_g",
38
- id: 7
39
- },
40
- {
41
- name: "kripo",
42
- short_name: "crypto_services_kripo",
43
- id: 8
2
+ general_data: {
3
+ id: index,
4
+ name: `Crypto Exchange ${index}`,
5
+ short_name: `crypto_exchange_${index}`,
6
+ founded: "2022-11-01 00:00:00",
7
+ headquarters: `Headquarters ${index}`,
8
+ best_for: "Selling",
9
+ url: "http://google.com/test222",
10
+ markets_amount: "3000 +",
11
+ currencies_amount: "3 including 25+",
12
+ rating_security: 1,
13
+ rating_fees: 3,
14
+ rating_usability: 3,
15
+ rating_features: 3,
16
+ rating_support: 3,
17
+ rating_average: 2.6,
18
+ exchange_type: "Decentralized",
19
+ crypto_currencies: [
20
+ 1,
21
+ 2
22
+ ],
23
+ fiat_currencies: [
24
+ 3,
25
+ 9
26
+ ],
27
+ restricted_countries: [
28
+ 1,
29
+ 254
30
+ ],
31
+ selling_points: [
32
+ "800games",
33
+ "1000_games"
34
+ ],
35
+ services: [
36
+ {
37
+ name: "g test",
38
+ short_name: "crypto_services_g",
39
+ id: 7
40
+ },
41
+ {
42
+ name: "kripo",
43
+ short_name: "crypto_services_kripo",
44
+ id: 8
45
+ }
46
+ ],
47
+ licences: [],
48
+ support_types: [
49
+ "support_type_facebook",
50
+ "support_type_faq_section"
51
+ ],
52
+ logo: {
53
+ title: "Picking Betting Sites - Step 3: markets",
54
+ filename: "1668091295/step-3-markets-casinotopsonline",
55
+ extension: ".png",
56
+ url: "https://assets-srv.s3.eu-west-1.amazonaws.com/1668091295/step-3-markets-casinotopsonline.png",
57
+ width: "512",
58
+ height: "512",
59
+ alt: "Picking Betting Sites - Step 3: markets",
60
+ color: null,
61
+ id: 97121,
62
+ raw_filename: "1668091295/step-3-markets-casinotopsonline"
44
63
  }
45
- ],
46
- licences: [],
47
- support_types: [
48
- "support_type_facebook",
49
- "support_type_faq_section"
50
- ],
51
- logo: {
52
- title: "Picking Betting Sites - Step 3: markets",
53
- filename: "1668091295/step-3-markets-casinotopsonline",
54
- extension: ".png",
55
- url: "https://assets-srv.s3.eu-west-1.amazonaws.com/1668091295/step-3-markets-casinotopsonline.png",
56
- width: "512",
57
- height: "512",
58
- alt: "Picking Betting Sites - Step 3: markets",
59
- color: null,
60
- id: 97121,
61
- raw_filename: "1668091295/step-3-markets-casinotopsonline"
62
- }
64
+
65
+ },
66
+
63
67
  })
64
68
 
65
69
  export const transformedCryptoExchanges = () => ({