Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-plaid-link

Package Overview
Dependencies
Maintainers
9
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-plaid-link - npm Package Compare versions

Comparing version 3.4.0 to 3.4.1

5

CHANGELOG.md
# Changelog
## 3.4.1
- Add missing events to `PlaidLinkStableEvent` [#310](https://github.com/plaid/react-plaid-link/pull/310)
- Update function return types for `usePlaidLink` [#312](https://github.com/plaid/react-plaid-link/pull/312)
- Update early return condition in `usePlaidLink` for possible inputs [#316](https://github.com/plaid/react-plaid-link/pull/316)
## 3.4.0

@@ -4,0 +9,0 @@

5

dist/index.d.ts

@@ -60,3 +60,6 @@ /// <reference types="react" />

SELECT_INSTITUTION = "SELECT_INSTITUTION",
ERROR = "ERROR"
ERROR = "ERROR",
BANK_INCOME_INSIGHTS_COMPLETED = "BANK_INCOME_INSIGHTS_COMPLETED",
IDENTITY_VERIFICATION_PASS_SESSION = "IDENTITY_VERIFICATION_PASS_SESSION",
IDENTITY_VERIFICATION_FAIL_SESSION = "IDENTITY_VERIFICATION_FAIL_SESSION"
}

@@ -63,0 +66,0 @@ type PlaidLinkOnEvent = (

@@ -60,3 +60,6 @@ /// <reference types="react" />

SELECT_INSTITUTION = "SELECT_INSTITUTION",
ERROR = "ERROR"
ERROR = "ERROR",
BANK_INCOME_INSIGHTS_COMPLETED = "BANK_INCOME_INSIGHTS_COMPLETED",
IDENTITY_VERIFICATION_PASS_SESSION = "IDENTITY_VERIFICATION_PASS_SESSION",
IDENTITY_VERIFICATION_FAIL_SESSION = "IDENTITY_VERIFICATION_FAIL_SESSION"
}

@@ -63,0 +66,0 @@ type PlaidLinkOnEvent = (

7

dist/index.esm.js

@@ -422,6 +422,6 @@ import react, { useState, useEffect } from 'react';

return;
} // If the token and publicKey is undefined, return prematurely
} // If the token, publicKey, and received redirect URI are undefined, return prematurely
if (!options.token && !options.publicKey) {
if (!options.token && !options.publicKey && !options.receivedRedirectUri) {
return;

@@ -516,4 +516,7 @@ }

PlaidLinkStableEvent["ERROR"] = "ERROR";
PlaidLinkStableEvent["BANK_INCOME_INSIGHTS_COMPLETED"] = "BANK_INCOME_INSIGHTS_COMPLETED";
PlaidLinkStableEvent["IDENTITY_VERIFICATION_PASS_SESSION"] = "IDENTITY_VERIFICATION_PASS_SESSION";
PlaidLinkStableEvent["IDENTITY_VERIFICATION_FAIL_SESSION"] = "IDENTITY_VERIFICATION_FAIL_SESSION";
})(PlaidLinkStableEvent || (PlaidLinkStableEvent = {}));
export { PlaidLink, PlaidLinkStableEvent, usePlaidLink };

@@ -429,6 +429,6 @@ 'use strict';

return;
} // If the token and publicKey is undefined, return prematurely
} // If the token, publicKey, and received redirect URI are undefined, return prematurely
if (!options.token && !options.publicKey) {
if (!options.token && !options.publicKey && !options.receivedRedirectUri) {
return;

@@ -522,2 +522,5 @@ }

PlaidLinkStableEvent["ERROR"] = "ERROR";
PlaidLinkStableEvent["BANK_INCOME_INSIGHTS_COMPLETED"] = "BANK_INCOME_INSIGHTS_COMPLETED";
PlaidLinkStableEvent["IDENTITY_VERIFICATION_PASS_SESSION"] = "IDENTITY_VERIFICATION_PASS_SESSION";
PlaidLinkStableEvent["IDENTITY_VERIFICATION_FAIL_SESSION"] = "IDENTITY_VERIFICATION_FAIL_SESSION";
})(exports.PlaidLinkStableEvent || (exports.PlaidLinkStableEvent = {}));

@@ -524,0 +527,0 @@

@@ -60,3 +60,6 @@ /// <reference types="react" />

SELECT_INSTITUTION = "SELECT_INSTITUTION",
ERROR = "ERROR"
ERROR = "ERROR",
BANK_INCOME_INSIGHTS_COMPLETED = "BANK_INCOME_INSIGHTS_COMPLETED",
IDENTITY_VERIFICATION_PASS_SESSION = "IDENTITY_VERIFICATION_PASS_SESSION",
IDENTITY_VERIFICATION_FAIL_SESSION = "IDENTITY_VERIFICATION_FAIL_SESSION"
}

@@ -63,0 +66,0 @@ type PlaidLinkOnEvent = (

@@ -428,6 +428,6 @@ (function (global, factory) {

return;
} // If the token and publicKey is undefined, return prematurely
} // If the token, publicKey, and received redirect URI are undefined, return prematurely
if (!options.token && !options.publicKey) {
if (!options.token && !options.publicKey && !options.receivedRedirectUri) {
return;

@@ -521,2 +521,5 @@ }

PlaidLinkStableEvent["ERROR"] = "ERROR";
PlaidLinkStableEvent["BANK_INCOME_INSIGHTS_COMPLETED"] = "BANK_INCOME_INSIGHTS_COMPLETED";
PlaidLinkStableEvent["IDENTITY_VERIFICATION_PASS_SESSION"] = "IDENTITY_VERIFICATION_PASS_SESSION";
PlaidLinkStableEvent["IDENTITY_VERIFICATION_FAIL_SESSION"] = "IDENTITY_VERIFICATION_FAIL_SESSION";
})(exports.PlaidLinkStableEvent || (exports.PlaidLinkStableEvent = {}));

@@ -523,0 +526,0 @@

@@ -60,3 +60,6 @@ /// <reference types="react" />

SELECT_INSTITUTION = "SELECT_INSTITUTION",
ERROR = "ERROR"
ERROR = "ERROR",
BANK_INCOME_INSIGHTS_COMPLETED = "BANK_INCOME_INSIGHTS_COMPLETED",
IDENTITY_VERIFICATION_PASS_SESSION = "IDENTITY_VERIFICATION_PASS_SESSION",
IDENTITY_VERIFICATION_FAIL_SESSION = "IDENTITY_VERIFICATION_FAIL_SESSION"
}

@@ -63,0 +66,0 @@ type PlaidLinkOnEvent = (

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e=e||self).PlaidLink={},e.React)}(this,(function(e,t){"use strict";var n="default"in t?t.default:t;function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){a=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d(e,t){return e(t={exports:{}},t.exports),t.exports}var s=d((function(e,t){var r=c&&c.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.scripts=void 0,t.scripts={};var o=function(e){var n=document.querySelector('script[src="'+e+'"]');if(n)return t.scripts[e]={loading:!1,error:null,scriptEl:n}};t.default=function(e){var l=e.src,a=e.checkForExisting,u=void 0!==a&&a,c=r(e,["src","checkForExisting"]),f=l?t.scripts[l]:void 0;!f&&u&&l&&i&&(f=o(l));var d=(0,n.useState)(f?f.loading:Boolean(l)),s=d[0],p=d[1],y=(0,n.useState)(f?f.error:null),b=y[0],v=y[1];return(0,n.useEffect)((function(){if(i&&l&&s&&!b){var e;!(f=t.scripts[l])&&u&&(f=o(l)),f?e=f.scriptEl:((e=document.createElement("script")).src=l,Object.keys(c).forEach((function(t){void 0===e[t]?e.setAttribute(t,c[t]):e[t]=c[t]})),f=t.scripts[l]={loading:!0,error:null,scriptEl:e});var n=function(){f&&(f.loading=!1),p(!1)},r=function(e){f&&(f.error=e),v(e)};return e.addEventListener("load",n),e.addEventListener("error",r),document.body.appendChild(e),function(){e.removeEventListener("load",n),e.removeEventListener("error",r)}}}),[l]),[s,b]};var i="undefined"!=typeof window&&void 0!==window.document}));f(s);s.scripts;var p,y=d((function(e,t){var n=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.scripts=t.default=void 0,Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(s).default}}),Object.defineProperty(t,"scripts",{enumerable:!0,get:function(){return s.scripts}})})),b=f(y),v=(y.scripts,function(e,t){var n,r,l,a;return function(e,t){var n={plaid:null,open:!1,onExitCallback:null};if("undefined"==typeof window||!window.Plaid)throw new Error("Plaid not loaded");n.plaid=t(o(o({},e),{},{onExit:function(t,r){n.open=!1,e.onExit&&e.onExit(t,r),n.onExitCallback&&n.onExitCallback()}}));return{open:function(){n.plaid&&(n.open=!0,n.onExitCallback=null,n.plaid.open())},exit:function(e,t){n.open&&n.plaid?(n.onExitCallback=t,n.plaid.exit(e),e&&e.force&&(n.open=!1)):t&&t()},destroy:function(){n.plaid&&(n.plaid.destroy(),n.plaid=null)}}}((n=e,r="publicKey",l="key",a={},delete Object.assign(a,n,i({},l,n[r]))[r],a),t)}),O=function(){},E=function(e){var n=a(b({src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",checkForExisting:!0}),2),r=n[0],i=n[1],l=a(t.useState(null),2),u=l[0],c=l[1],f=a(t.useState(!1),2),d=f[0],s=f[1],p=(e.product||[]).slice().sort().join(",");t.useEffect((function(){if(!r&&(e.token||e.publicKey)){if(!i&&window.Plaid){null!=u&&u.exit({force:!0},(function(){return u.destroy()}));var t=v(o(o({},e),{},{onLoad:function(){s(!0),e.onLoad&&e.onLoad()}}),window.Plaid.create);return c(t),function(){return t.exit({force:!0},(function(){return t.destroy()}))}}console.error("Error loading Plaid",i)}}),[r,i,e.publicKey,e.token,p]);return{error:i,ready:null!=u&&(!r||d),exit:u?u.exit:O,open:u?u.open:function(){e.token||console.warn("react-plaid-link: You cannot call open() without a valid token supplied to usePlaidLink. This is a no-op.")}}},g=["children","style","className"],m=function(e){var t=e.children,r=e.style,i=e.className,a=l(e,g),u=E(o({},a)),c=u.error,f=u.open;return n.createElement("button",{disabled:Boolean(c),type:"button",className:i,style:o({padding:"6px 4px",outline:"none",background:"#FFFFFF",border:"2px solid #F1F1F1",borderRadius:"4px"},r),onClick:function(){return f()}},t)};m.displayName="PlaidLink",(p=e.PlaidLinkStableEvent||(e.PlaidLinkStableEvent={})).OPEN="OPEN",p.EXIT="EXIT",p.HANDOFF="HANDOFF",p.SELECT_INSTITUTION="SELECT_INSTITUTION",p.ERROR="ERROR",e.PlaidLink=m,e.usePlaidLink=E,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e=e||self).PlaidLink={},e.React)}(this,(function(e,t){"use strict";var n="default"in t?t.default:t;function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],l=!0,a=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){a=!0,o=e}finally{try{l||null==n.return||n.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function f(e,t){return e(t={exports:{}},t.exports),t.exports}var s=f((function(e,t){var r=c&&c.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.scripts=void 0,t.scripts={};var o=function(e){var n=document.querySelector('script[src="'+e+'"]');if(n)return t.scripts[e]={loading:!1,error:null,scriptEl:n}};t.default=function(e){var l=e.src,a=e.checkForExisting,u=void 0!==a&&a,c=r(e,["src","checkForExisting"]),d=l?t.scripts[l]:void 0;!d&&u&&l&&i&&(d=o(l));var f=(0,n.useState)(d?d.loading:Boolean(l)),s=f[0],p=f[1],y=(0,n.useState)(d?d.error:null),b=y[0],O=y[1];return(0,n.useEffect)((function(){if(i&&l&&s&&!b){var e;!(d=t.scripts[l])&&u&&(d=o(l)),d?e=d.scriptEl:((e=document.createElement("script")).src=l,Object.keys(c).forEach((function(t){void 0===e[t]?e.setAttribute(t,c[t]):e[t]=c[t]})),d=t.scripts[l]={loading:!0,error:null,scriptEl:e});var n=function(){d&&(d.loading=!1),p(!1)},r=function(e){d&&(d.error=e),O(e)};return e.addEventListener("load",n),e.addEventListener("error",r),document.body.appendChild(e),function(){e.removeEventListener("load",n),e.removeEventListener("error",r)}}}),[l]),[s,b]};var i="undefined"!=typeof window&&void 0!==window.document}));d(s);s.scripts;var p,y=f((function(e,t){var n=c&&c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.scripts=t.default=void 0,Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(s).default}}),Object.defineProperty(t,"scripts",{enumerable:!0,get:function(){return s.scripts}})})),b=d(y),O=(y.scripts,function(e,t){var n,r,l,a;return function(e,t){var n={plaid:null,open:!1,onExitCallback:null};if("undefined"==typeof window||!window.Plaid)throw new Error("Plaid not loaded");n.plaid=t(o(o({},e),{},{onExit:function(t,r){n.open=!1,e.onExit&&e.onExit(t,r),n.onExitCallback&&n.onExitCallback()}}));return{open:function(){n.plaid&&(n.open=!0,n.onExitCallback=null,n.plaid.open())},exit:function(e,t){n.open&&n.plaid?(n.onExitCallback=t,n.plaid.exit(e),e&&e.force&&(n.open=!1)):t&&t()},destroy:function(){n.plaid&&(n.plaid.destroy(),n.plaid=null)}}}((n=e,r="publicKey",l="key",a={},delete Object.assign(a,n,i({},l,n[r]))[r],a),t)}),E=function(){},v=function(e){var n=a(b({src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",checkForExisting:!0}),2),r=n[0],i=n[1],l=a(t.useState(null),2),u=l[0],c=l[1],d=a(t.useState(!1),2),f=d[0],s=d[1],p=(e.product||[]).slice().sort().join(",");t.useEffect((function(){if(!r&&(e.token||e.publicKey||e.receivedRedirectUri)){if(!i&&window.Plaid){null!=u&&u.exit({force:!0},(function(){return u.destroy()}));var t=O(o(o({},e),{},{onLoad:function(){s(!0),e.onLoad&&e.onLoad()}}),window.Plaid.create);return c(t),function(){return t.exit({force:!0},(function(){return t.destroy()}))}}console.error("Error loading Plaid",i)}}),[r,i,e.publicKey,e.token,p]);return{error:i,ready:null!=u&&(!r||f),exit:u?u.exit:E,open:u?u.open:function(){e.token||console.warn("react-plaid-link: You cannot call open() without a valid token supplied to usePlaidLink. This is a no-op.")}}},I=["children","style","className"],S=function(e){var t=e.children,r=e.style,i=e.className,a=l(e,I),u=v(o({},a)),c=u.error,d=u.open;return n.createElement("button",{disabled:Boolean(c),type:"button",className:i,style:o({padding:"6px 4px",outline:"none",background:"#FFFFFF",border:"2px solid #F1F1F1",borderRadius:"4px"},r),onClick:function(){return d()}},t)};S.displayName="PlaidLink",(p=e.PlaidLinkStableEvent||(e.PlaidLinkStableEvent={})).OPEN="OPEN",p.EXIT="EXIT",p.HANDOFF="HANDOFF",p.SELECT_INSTITUTION="SELECT_INSTITUTION",p.ERROR="ERROR",p.BANK_INCOME_INSIGHTS_COMPLETED="BANK_INCOME_INSIGHTS_COMPLETED",p.IDENTITY_VERIFICATION_PASS_SESSION="IDENTITY_VERIFICATION_PASS_SESSION",p.IDENTITY_VERIFICATION_FAIL_SESSION="IDENTITY_VERIFICATION_FAIL_SESSION",e.PlaidLink=S,e.usePlaidLink=v,Object.defineProperty(e,"__esModule",{value:!0})}));
{
"name": "react-plaid-link",
"version": "3.4.0",
"version": "3.4.1",
"description": "A React component for Plaid Link",

@@ -5,0 +5,0 @@ "registry": "https://registry.npmjs.org",

@@ -10,5 +10,5 @@ import {

export interface PlaidFactory {
open: Function;
exit: Function;
destroy: Function;
open: (() => void) | Function;
exit: ((exitOptions: any, callback: () => void) => void) | Function;
destroy: (() => void) | Function;
}

@@ -19,3 +19,3 @@

open: boolean;
onExitCallback: Function | null;
onExitCallback: (() => void) | null | Function;
}

@@ -69,3 +69,3 @@

const exit = (exitOptions: any, callback: Function) => {
const exit = (exitOptions: any, callback: (() => void) | Function) => {
if (!state.open || !state.plaid) {

@@ -72,0 +72,0 @@ callback && callback();

@@ -75,2 +75,5 @@ import React from 'react';

ERROR = 'ERROR',
BANK_INCOME_INSIGHTS_COMPLETED = 'BANK_INCOME_INSIGHTS_COMPLETED',
IDENTITY_VERIFICATION_PASS_SESSION = 'IDENTITY_VERIFICATION_PASS_SESSION',
IDENTITY_VERIFICATION_FAIL_SESSION = 'IDENTITY_VERIFICATION_FAIL_SESSION'
}

@@ -77,0 +80,0 @@

@@ -5,3 +5,3 @@ import { useEffect, useState } from 'react';

import { createPlaid, PlaidFactory } from './factory';
import { PlaidLinkOptions, PlaidLinkOptionsWithPublicKey } from './types';
import { PlaidLinkOptions, PlaidLinkOptionsWithLinkToken, PlaidLinkOptionsWithPublicKey } from './types';

@@ -44,6 +44,7 @@ const PLAID_LINK_STABLE_URL =

// If the token and publicKey is undefined, return prematurely
// If the token, publicKey, and received redirect URI are undefined, return prematurely
if (
!options.token &&
!(options as PlaidLinkOptionsWithPublicKey).publicKey
!(options as PlaidLinkOptionsWithPublicKey).publicKey &&
!(options as PlaidLinkOptionsWithLinkToken).receivedRedirectUri
) {

@@ -50,0 +51,0 @@ return;

@@ -59,3 +59,6 @@ import { EIP1193Provider as ImportedEIP1193Provider } from "./web3Provider";

SELECT_INSTITUTION = "SELECT_INSTITUTION",
ERROR = "ERROR"
ERROR = "ERROR",
BANK_INCOME_INSIGHTS_COMPLETED = "BANK_INCOME_INSIGHTS_COMPLETED",
IDENTITY_VERIFICATION_PASS_SESSION = "IDENTITY_VERIFICATION_PASS_SESSION",
IDENTITY_VERIFICATION_FAIL_SESSION = "IDENTITY_VERIFICATION_FAIL_SESSION"
}

@@ -62,0 +65,0 @@ type PlaidLinkOnEvent = (

@@ -59,3 +59,6 @@ import { EIP1193Provider as ImportedEIP1193Provider } from "./web3Provider";

SELECT_INSTITUTION = "SELECT_INSTITUTION",
ERROR = "ERROR"
ERROR = "ERROR",
BANK_INCOME_INSIGHTS_COMPLETED = "BANK_INCOME_INSIGHTS_COMPLETED",
IDENTITY_VERIFICATION_PASS_SESSION = "IDENTITY_VERIFICATION_PASS_SESSION",
IDENTITY_VERIFICATION_FAIL_SESSION = "IDENTITY_VERIFICATION_FAIL_SESSION"
}

@@ -62,0 +65,0 @@ type PlaidLinkOnEvent = (

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc