@jolibox/implement 1.1.30 → 1.1.31

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.1.30 clean
3
+ > @jolibox/implement@1.1.31 clean
4
4
  > rimraf ./dist
5
5
 
6
6
 
7
- > @jolibox/implement@1.1.30 build:esm
7
+ > @jolibox/implement@1.1.31 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,15 +1,15 @@
1
1
  {
2
2
  "name": "@jolibox/implement",
3
3
  "description": "This project is Jolibox JS-SDk implement for Native && H5",
4
- "version": "1.1.30",
4
+ "version": "1.1.31",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
7
7
  "license": "MIT",
8
8
  "dependencies": {
9
- "@jolibox/common": "1.1.30",
10
- "@jolibox/types": "1.1.30",
11
- "@jolibox/native-bridge": "1.1.30",
12
- "@jolibox/ads": "1.1.30",
9
+ "@jolibox/common": "1.1.31",
10
+ "@jolibox/types": "1.1.31",
11
+ "@jolibox/native-bridge": "1.1.31",
12
+ "@jolibox/ads": "1.1.31",
13
13
  "localforage": "1.10.0",
14
14
  "@jolibox/ui": "1.0.0",
15
15
  "web-vitals": "4.2.4"
@@ -7,6 +7,7 @@ import {
7
7
  createInitiateAndAwaitPayment
8
8
  } from './utils/coins';
9
9
  import { createEventPromiseHandler } from './utils/event-listener';
10
+ import { IRewardParams } from '@jolibox/types';
10
11
 
11
12
  export type JolicoinOnlyRewardsHandler = (params: IAdBreakParams) => Promise<boolean>;
12
13
  export const createJolicoinOnlyRewardHandler = (
@@ -97,7 +97,7 @@ rewardsEmitter.on(UseModalEventName, async (type: 'JOLI_COIN' | 'ADS-JOLI_COIN',
97
97
  text: params.confirmButtonText,
98
98
  onPress: () => {
99
99
  rewardsEmitter.emit(UseModalResultEventName, { useModalResult: 'CONFIRM' });
100
- modal.hide();
100
+ modal.destroy();
101
101
  }
102
102
  },
103
103
  cancel: {
@@ -106,7 +106,7 @@ rewardsEmitter.on(UseModalEventName, async (type: 'JOLI_COIN' | 'ADS-JOLI_COIN',
106
106
  rewardsEmitter.emit(UseModalResultEventName, {
107
107
  useModalResult: (type ?? '') === 'CANCEL' ? 'CANCEL' : 'FAILED'
108
108
  });
109
- modal.hide();
109
+ modal.destroy();
110
110
  }
111
111
  },
112
112
  onEnableDeductChanged: async (enabled: boolean) => {
@@ -189,7 +189,7 @@ rewardsEmitter.on(
189
189
  const balenceDetails = await getBalenceDetails();
190
190
  if ((balenceDetails?.balance ?? 0) >= params.joliCoinQuantity) {
191
191
  rewardsEmitter.emit(PaymentResultEventName, { paymentResult: 'SUCCESS' });
192
- modal.hide();
192
+ modal.destroy();
193
193
  return;
194
194
  }
195
195
  }
@@ -200,7 +200,7 @@ rewardsEmitter.on(
200
200
 
201
201
  if (!appStoreProductId) {
202
202
  rewardsEmitter.emit(PaymentResultEventName, { paymentResult: 'FAILED' });
203
- modal.hide();
203
+ modal.destroy();
204
204
  return;
205
205
  }
206
206
  await loading.show({
@@ -217,7 +217,7 @@ rewardsEmitter.on(
217
217
  return;
218
218
  }
219
219
  rewardsEmitter.emit(PaymentResultEventName, { paymentResult: 'SUCCESS' });
220
- modal.hide();
220
+ modal.destroy();
221
221
  }
222
222
  },
223
223
  cancel: {
@@ -226,7 +226,7 @@ rewardsEmitter.on(
226
226
  rewardsEmitter.emit(PaymentResultEventName, {
227
227
  paymentResult: (type ?? '') === 'CANCEL' ? 'CANCEL' : 'FAILED'
228
228
  });
229
- modal.hide();
229
+ modal.destroy();
230
230
  }
231
231
  },
232
232
  onEnableDeductChanged: async (enabled: boolean) => {