Socket
Socket
Sign inDemoInstall

@front-finance/link

Package Overview
Dependencies
0
Maintainers
6
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.5 to 1.1.6

16

cjs/FrontConnection.js

@@ -44,4 +44,7 @@ "use strict";

var iframeUrlObject;
var iframeElement = function () {
return document.getElementById(popup_1.iframeId);
};
function eventsListener(event) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
switch (event.data.type) {

@@ -98,5 +101,10 @@ case 'brokerageAccountAccessToken': {

if (currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.accessTokens) {
var iframeElement = document.getElementById(popup_1.iframeId);
(_j = iframeElement.contentWindow) === null || _j === void 0 ? void 0 : _j.postMessage({ type: 'frontAccessTokens', payload: currentOptions.accessTokens }, (iframeUrlObject === null || iframeUrlObject === void 0 ? void 0 : iframeUrlObject.origin) || 'https://web.getfront.com');
(_j = iframeElement().contentWindow) === null || _j === void 0 ? void 0 : _j.postMessage({ type: 'frontAccessTokens', payload: currentOptions.accessTokens }, (iframeUrlObject === null || iframeUrlObject === void 0 ? void 0 : iframeUrlObject.origin) || 'https://web.getfront.com');
}
if (currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.transferDestinationTokens) {
(_k = iframeElement().contentWindow) === null || _k === void 0 ? void 0 : _k.postMessage({
type: 'frontTransferDestinationTokens',
payload: currentOptions.transferDestinationTokens
}, (iframeUrlObject === null || iframeUrlObject === void 0 ? void 0 : iframeUrlObject.origin) || 'https://web.getfront.com');
}
break;

@@ -106,3 +114,3 @@ }

if ((0, event_types_1.isFrontEventTypeKey)(event.data.type)) {
(_k = currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.onEvent) === null || _k === void 0 ? void 0 : _k.call(currentOptions, event.data);
(_l = currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.onEvent) === null || _l === void 0 ? void 0 : _l.call(currentOptions, event.data);
}

@@ -109,0 +117,0 @@ break;

@@ -107,2 +107,7 @@ import type { BrokerType } from '@front-finance/api';

accessTokens?: IntegrationAccessToken[];
/**
* (Optional) An array of integration access tokens.
* Can be used to initialize the crypto transfers flow as an alternative to the target addresses.
*/
transferDestinationTokens?: IntegrationAccessToken[];
}

@@ -41,4 +41,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

var iframeUrlObject;
var iframeElement = function () {
return document.getElementById(iframeId);
};
function eventsListener(event) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
switch (event.data.type) {

@@ -95,5 +98,10 @@ case 'brokerageAccountAccessToken': {

if (currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.accessTokens) {
var iframeElement = document.getElementById(iframeId);
(_j = iframeElement.contentWindow) === null || _j === void 0 ? void 0 : _j.postMessage({ type: 'frontAccessTokens', payload: currentOptions.accessTokens }, (iframeUrlObject === null || iframeUrlObject === void 0 ? void 0 : iframeUrlObject.origin) || 'https://web.getfront.com');
(_j = iframeElement().contentWindow) === null || _j === void 0 ? void 0 : _j.postMessage({ type: 'frontAccessTokens', payload: currentOptions.accessTokens }, (iframeUrlObject === null || iframeUrlObject === void 0 ? void 0 : iframeUrlObject.origin) || 'https://web.getfront.com');
}
if (currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.transferDestinationTokens) {
(_k = iframeElement().contentWindow) === null || _k === void 0 ? void 0 : _k.postMessage({
type: 'frontTransferDestinationTokens',
payload: currentOptions.transferDestinationTokens
}, (iframeUrlObject === null || iframeUrlObject === void 0 ? void 0 : iframeUrlObject.origin) || 'https://web.getfront.com');
}
break;

@@ -103,3 +111,3 @@ }

if (isFrontEventTypeKey(event.data.type)) {
(_k = currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.onEvent) === null || _k === void 0 ? void 0 : _k.call(currentOptions, event.data);
(_l = currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.onEvent) === null || _l === void 0 ? void 0 : _l.call(currentOptions, event.data);
}

@@ -106,0 +114,0 @@ break;

{
"name": "@front-finance/link",
"version": "1.1.5",
"version": "1.1.6",
"description": "Front Finance accounts connection client lib",

@@ -9,2 +9,3 @@ "license": "MIT",

"devDependencies": {
"@types/jest": "^29.5.4",
"@typescript-eslint/eslint-plugin": "^4.21.0",

@@ -16,8 +17,7 @@ "@typescript-eslint/parser": "^4.21.0",

"eslint-plugin-prettier": "^3.4.0",
"jest": "^29.6.4",
"jest-environment-jsdom": "^29.6.4",
"prettier": "^2.2.1",
"typescript": "^4.6.4",
"ts-jest": "^29.1.1",
"jest": "^29.6.4",
"@types/jest": "^29.5.4",
"jest-environment-jsdom": "^29.6.4"
"typescript": "^4.6.4"
},

@@ -43,2 +43,2 @@ "dependencies": {},

"types": "index.d.ts"
}
}

@@ -107,2 +107,7 @@ import type { BrokerType } from '@front-finance/api';

accessTokens?: IntegrationAccessToken[];
/**
* (Optional) An array of integration access tokens.
* Can be used to initialize the crypto transfers flow as an alternative to the target addresses.
*/
transferDestinationTokens?: IntegrationAccessToken[];
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc