@jolibox/implement 1.4.6 → 1.4.7

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.
@@ -1,9 +1,9 @@
1
1
  Invoking: npm run clean && npm run build:esm && tsc
2
2
 
3
- > @jolibox/implement@1.4.6 clean
3
+ > @jolibox/implement@1.4.7 clean
4
4
  > rimraf ./dist
5
5
 
6
6
 
7
- > @jolibox/implement@1.4.6 build:esm
7
+ > @jolibox/implement@1.4.7 build:esm
8
8
  > BUILD_VERSION=$(node -p "require('./package.json').version") node esbuild.config.js --format=esm
9
9
 
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@jolibox/implement",
3
3
  "description": "This project is Jolibox JS-SDk implement for Native && H5",
4
- "version": "1.4.6",
4
+ "version": "1.4.7",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
7
7
  "license": "MIT",
8
8
  "dependencies": {
9
- "@jolibox/common": "1.4.6",
10
- "@jolibox/types": "1.4.6",
11
- "@jolibox/native-bridge": "1.4.6",
12
- "@jolibox/ads": "1.4.6",
9
+ "@jolibox/common": "1.4.7",
10
+ "@jolibox/types": "1.4.7",
11
+ "@jolibox/native-bridge": "1.4.7",
12
+ "@jolibox/ads": "1.4.7",
13
13
  "localforage": "1.10.0",
14
- "@jolibox/ui": "1.4.6",
14
+ "@jolibox/ui": "1.4.7",
15
15
  "web-vitals": "4.2.4"
16
16
  },
17
17
  "devDependencies": {
@@ -175,12 +175,15 @@ const createRewardsAdsManager = createAPI('createRewardsAdsManager', {
175
175
  }
176
176
  });
177
177
  },
178
- showAd: async (callbacks: {
179
- onAdLoaded?: () => void;
180
- onAdError?: (error: Error) => void;
181
- onAdRewarded?: () => void;
182
- onAdDismissed?: () => void;
183
- }) => {
178
+ showAd: async (
179
+ callbacks: {
180
+ onAdLoaded?: () => void;
181
+ onAdError?: (error: Error) => void;
182
+ onAdRewarded?: () => void;
183
+ onAdDismissed?: () => void;
184
+ },
185
+ isSpinWheel = false
186
+ ) => {
184
187
  ads.adBreak({
185
188
  type: 'reward',
186
189
  beforeReward: (showAdFn) => {
@@ -204,9 +207,10 @@ const createRewardsAdsManager = createAPI('createRewardsAdsManager', {
204
207
  if (breakStatus === 'viewed') {
205
208
  // reward should be given to user
206
209
  console.log('-----> complete watch ads');
207
- taskTracker.reporter({
208
- event: 'COMPLETE_WATCH_ADS'
209
- });
210
+ !isSpinWheel &&
211
+ taskTracker.reporter({
212
+ event: 'COMPLETE_WATCH_ADS'
213
+ });
210
214
  callbacks.onAdRewarded?.();
211
215
  }
212
216