@apps-in-toss/native-modules 2.9.2 → 2.10.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.
package/dist/index.cjs CHANGED
@@ -443,7 +443,8 @@ function showAppsInTossAdMob(params) {
443
443
  onEvent({ type: "show" });
444
444
  },
445
445
  onUserEarnedReward: (data) => {
446
- onEvent({ type: "userEarnedReward", data });
446
+ const normalized = "type" in data ? { unitType: data.type, unitAmount: data.amount } : data;
447
+ onEvent({ type: "userEarnedReward", data: normalized });
447
448
  },
448
449
  onSuccess: () => onEvent({ type: "requested" }),
449
450
  onError
package/dist/index.js CHANGED
@@ -356,7 +356,8 @@ function showAppsInTossAdMob(params) {
356
356
  onEvent({ type: "show" });
357
357
  },
358
358
  onUserEarnedReward: (data) => {
359
- onEvent({ type: "userEarnedReward", data });
359
+ const normalized = "type" in data ? { unitType: data.type, unitAmount: data.amount } : data;
360
+ onEvent({ type: "userEarnedReward", data: normalized });
360
361
  },
361
362
  onSuccess: () => onEvent({ type: "requested" }),
362
363
  onError
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@apps-in-toss/native-modules",
3
3
  "type": "module",
4
- "version": "2.9.2",
4
+ "version": "2.10.0",
5
5
  "description": "Native Modules for Apps In Toss",
6
6
  "scripts": {
7
7
  "typecheck": "tsc --noEmit",
@@ -42,7 +42,7 @@
42
42
  "vitest": "^3.2.4"
43
43
  },
44
44
  "dependencies": {
45
- "@apps-in-toss/types": "2.9.2",
45
+ "@apps-in-toss/types": "2.10.0",
46
46
  "brick-module": "0.5.2",
47
47
  "es-toolkit": "^1.39.3"
48
48
  },
@@ -302,8 +302,10 @@ export function showAppsInTossAdMob(params: ShowAdMobParams) {
302
302
  onAdShow: () => {
303
303
  onEvent({ type: 'show' });
304
304
  },
305
- onUserEarnedReward: (data: { unitType: string; unitAmount: number }) => {
306
- onEvent({ type: 'userEarnedReward', data });
305
+ onUserEarnedReward: (data: { unitType: string; unitAmount: number } | { type: string; amount: number }) => {
306
+ const normalized: { unitType: string; unitAmount: number } =
307
+ 'type' in data ? { unitType: data.type, unitAmount: data.amount } : data;
308
+ onEvent({ type: 'userEarnedReward', data: normalized });
307
309
  },
308
310
  onSuccess: () => onEvent({ type: 'requested' }),
309
311
  onError,