insert-affiliate-react-native-sdk 1.2.1 → 1.2.3

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.
@@ -174,12 +174,8 @@ const DeepLinkIapProvider = ({ children, }) => {
174
174
  // MARK: Insert Affiliate Identifier
175
175
  const setInsertAffiliateIdentifier = (referringLink, completion) => __awaiter(void 0, void 0, void 0, function* () {
176
176
  try {
177
- try {
178
- generateThenSetUserID();
179
- }
180
- catch (error) {
181
- console.error("[Insert Affiliate] Error setting user ID:", error);
182
- }
177
+ console.log("[Insert Affiliate] Setting affiliate identifier.");
178
+ generateThenSetUserID();
183
179
  if (!referringLink) {
184
180
  console.warn("[Insert Affiliate] Referring link is invalid.");
185
181
  storeInsertAffiliateIdentifier({ link: referringLink });
@@ -214,6 +210,7 @@ const DeepLinkIapProvider = ({ children, }) => {
214
210
  }
215
211
  // Create the request URL
216
212
  const urlString = `https://api.insertaffiliate.com/V1/convert-deep-link-to-short-link?companyId=${companyCode}&deepLinkUrl=${encodedAffiliateLink}`;
213
+ console.log("[Insert Affiliate] urlString .", urlString);
217
214
  const response = yield axios_1.default.get(urlString, {
218
215
  headers: {
219
216
  "Content-Type": "application/json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "insert-affiliate-react-native-sdk",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "A package for connecting with the Insert Affiliate Platform to add app based affiliate marketing.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -211,12 +211,8 @@ const DeepLinkIapProvider: React.FC<T_DEEPLINK_IAP_PROVIDER> = ({
211
211
  completion: (shortLink: string | null) => void
212
212
  ) => {
213
213
  try {
214
- try {
215
- generateThenSetUserID();
216
- } catch (error) {
217
- console.error("[Insert Affiliate] Error setting user ID:", error);
218
- }
219
-
214
+ console.log("[Insert Affiliate] Setting affiliate identifier.");
215
+ generateThenSetUserID();
220
216
 
221
217
  if (!referringLink) {
222
218
  console.warn("[Insert Affiliate] Referring link is invalid.");
@@ -259,6 +255,7 @@ const DeepLinkIapProvider: React.FC<T_DEEPLINK_IAP_PROVIDER> = ({
259
255
 
260
256
  // Create the request URL
261
257
  const urlString = `https://api.insertaffiliate.com/V1/convert-deep-link-to-short-link?companyId=${companyCode}&deepLinkUrl=${encodedAffiliateLink}`;
258
+ console.log("[Insert Affiliate] urlString .", urlString);
262
259
  const response = await axios.get(urlString, {
263
260
  headers: {
264
261
  "Content-Type": "application/json",