From 85fa7e897b0103667d396df0eb9165d127d0359d Mon Sep 17 00:00:00 2001 From: aaditya singh Date: Thu, 22 Aug 2024 12:22:12 +0530 Subject: [PATCH] fix: fixed formatting inside ScLoan.js --- src/ScLoan.js | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/ScLoan.js b/src/ScLoan.js index f043f6e9..8045d221 100644 --- a/src/ScLoan.js +++ b/src/ScLoan.js @@ -31,12 +31,11 @@ const { SmallcaseGateway: SmallcaseGatewayNative } = NativeModules; * @throws {ScLoanError} */ const setup = async (config) => { - const safeConfig = safeObject(config); - if (safeConfig.environment === undefined || safeConfig.environment === null) - safeConfig.environment = ENV.PROD; + const safeConfig = safeObject(config); + if(safeConfig.environment === undefined || safeConfig.environment === null) safeConfig.environment = ENV.PROD - return SmallcaseGatewayNative.setupLoans(safeConfig); -}; + return SmallcaseGatewayNative.setupLoans(safeConfig); + }; /** * Triggers the LOS Journey @@ -46,10 +45,10 @@ const setup = async (config) => { * @throws {ScLoanError} */ const apply = async (loanInfo) => { - const safeLoanInfo = safeObject(loanInfo); + const safeLoanInfo = safeObject(loanInfo); - return SmallcaseGatewayNative.apply(safeLoanInfo); -}; + return SmallcaseGatewayNative.apply(safeLoanInfo); + }; /** * Triggers the Repayment Journey @@ -59,10 +58,10 @@ const apply = async (loanInfo) => { * @throws {ScLoanError} */ const pay = async (loanInfo) => { - const safeLoanInfo = safeObject(loanInfo); + const safeLoanInfo = safeObject(loanInfo); - return SmallcaseGatewayNative.pay(safeLoanInfo); -}; + return SmallcaseGatewayNative.pay(safeLoanInfo); + }; /** * Triggers the Withdraw Journey @@ -72,10 +71,10 @@ const pay = async (loanInfo) => { * @throws {ScLoanError} */ const withdraw = async (loanInfo) => { - const safeLoanInfo = safeObject(loanInfo); + const safeLoanInfo = safeObject(loanInfo); - return SmallcaseGatewayNative.withdraw(safeLoanInfo); -}; + return SmallcaseGatewayNative.withdraw(safeLoanInfo); + }; /** * Triggers the Servicing Journey @@ -85,10 +84,10 @@ const withdraw = async (loanInfo) => { * @throws {ScLoanError} */ const service = async (loanInfo) => { - const safeLoanInfo = safeObject(loanInfo); + const safeLoanInfo = safeObject(loanInfo); - return SmallcaseGatewayNative.service(safeLoanInfo); -}; + return SmallcaseGatewayNative.service(safeLoanInfo); + }; /** * Triggers the triggerInteraction function @@ -112,4 +111,4 @@ const ScLoan = { triggerInteraction, }; -export default ScLoan; +export default ScLoan; \ No newline at end of file