From 486de7295eec41f98d1ff5348b51907be3afe0f4 Mon Sep 17 00:00:00 2001 From: Riddhi Agrawal Date: Wed, 17 Jan 2024 12:07:57 +0530 Subject: [PATCH] fix: text change --- src/screens/HyperSwitch/SwitchMerchant/SwitchMerchant.res | 4 +++- src/screens/HyperSwitch/UserManagement/InviteUsers.res | 4 ++-- src/utils/PromiseUtils.res | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/screens/HyperSwitch/SwitchMerchant/SwitchMerchant.res b/src/screens/HyperSwitch/SwitchMerchant/SwitchMerchant.res index 015b29420..f8c8f3ca0 100644 --- a/src/screens/HyperSwitch/SwitchMerchant/SwitchMerchant.res +++ b/src/screens/HyperSwitch/SwitchMerchant/SwitchMerchant.res @@ -318,7 +318,9 @@ let make = (~userRole, ~isAddMerchantEnabled=false) => { } else { <> - + } } diff --git a/src/screens/HyperSwitch/UserManagement/InviteUsers.res b/src/screens/HyperSwitch/UserManagement/InviteUsers.res index ee60a6f6a..91d0d8e7a 100644 --- a/src/screens/HyperSwitch/UserManagement/InviteUsers.res +++ b/src/screens/HyperSwitch/UserManagement/InviteUsers.res @@ -120,7 +120,7 @@ let make = () => { let role = valDict->getStrArray("roleType")->LogicUtils.getValueFromArray(0, "") let emailPasswordsArray = [] - let arryPromises = + let arrayOfPromises = valDict ->getStrArray("emailList") ->Array.map(ele => { @@ -133,7 +133,7 @@ let make = () => { inviteUserReq(body, emailPasswordsArray) }) - let _ = await PromiseUtils.allSettledPolyfill(arryPromises) + let _ = await PromiseUtils.allSettledPolyfill(arrayOfPromises) showToast( ~message=magicLink diff --git a/src/utils/PromiseUtils.res b/src/utils/PromiseUtils.res index 9d4d760de..adc564af9 100644 --- a/src/utils/PromiseUtils.res +++ b/src/utils/PromiseUtils.res @@ -1,3 +1,6 @@ +// Pollyfill for Promise.allSettled() +// Promise.allSettled() takes an iterable of promises and returns a single promise that is fulfilled with an array of promise settlement result + let allSettledPolyfill = (arr: array>) => { let res = arr->Array.map(promise => promise->Promise.then(val => {