Skip to content

Commit

Permalink
fix: comments addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
PritishBudhiraja committed Aug 7, 2024
1 parent 772db29 commit 195a42f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/Payments/PlaidSDKIframe.res
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ let make = () => {
resolve(Nullable.null)
})
->catch(e => {
Console.log2("Retrieve Failed", e)
logInfo(Console.log2("Retrieve Failed", e))
resolve(Nullable.null)
})
->ignore
Expand Down
40 changes: 20 additions & 20 deletions src/Utilities/PaymentHelpers.res
Original file line number Diff line number Diff line change
Expand Up @@ -693,33 +693,33 @@ let rec intentCall = (
| None => Dict.make()
}
let walletName = session_token->getString("wallet_name", "")
if walletName === "open_banking" {
let metaData = [
(
"linkToken",
session_token
->getString("open_banking_session_token", "")
->JSON.Encode.string,
),
("pmAuthConnectorArray", ["plaid"]->Identity.anyTypeToJson),
("publishableKey", confirmParam.publishableKey->JSON.Encode.string),
("clientSecret", clientSecret->JSON.Encode.string),
("isForceSync", true->JSON.Encode.bool),
]->getJsonFromArrayOfJson

handlePostMessage([
("fullscreen", true->JSON.Encode.bool),
("param", "plaidSDK"->JSON.Encode.string),
("iframeId", iframeId->JSON.Encode.string),
("metadata", metaData),
])
}
let message = switch walletName {
| "apple_pay" => [
("applePayButtonClicked", true->JSON.Encode.bool),
("applePayPresent", session_token->anyTypeToJson),
]
| "google_pay" => [("googlePayThirdPartyFlow", session_token->anyTypeToJson)]
| "open_banking" => {
let metaData = [
(
"linkToken",
session_token
->getString("open_banking_session_token", "")
->JSON.Encode.string,
),
("pmAuthConnectorArray", ["plaid"]->Identity.anyTypeToJson),
("publishableKey", confirmParam.publishableKey->JSON.Encode.string),
("clientSecret", clientSecret->JSON.Encode.string),
("isForceSync", true->JSON.Encode.bool),
]->getJsonFromArrayOfJson
[
("fullscreen", true->JSON.Encode.bool),
("param", "plaidSDK"->JSON.Encode.string),
("iframeId", iframeId->JSON.Encode.string),
("metadata", metaData),
]
}
| _ => []
}

Expand Down

0 comments on commit 195a42f

Please sign in to comment.