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

extpay

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extpay - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

14

dist/ExtPay.common.js

@@ -113,6 +113,16 @@ 'use strict';

// var paid_callbacks = [];
function timeout(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function fetch_user() {
const storage = await get(['extensionpay_api_key', 'extensionpay_user']);
var storage = await get(['extensionpay_api_key', 'extensionpay_user']);
// wait 10 seconds for api key to be returned if creator is running this in background.js immediately after extpay initialization
for (var i=0; i < 20; ++i) {
if (storage.extensionpay_api_key) break;
await timeout(500);
storage = await get(['extensionpay_api_key', 'extensionpay_user']);
}
if (!storage.extensionpay_api_key) throw 'Error registering user.'
const resp = await fetch(`${EXTENSION_URL}/api/user?api_key=${storage.extensionpay_api_key}`, {

@@ -119,0 +129,0 @@ method: 'GET',

@@ -1342,6 +1342,16 @@ var ExtPay = (function () {

// var paid_callbacks = [];
function timeout(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function fetch_user() {
const storage = await get(['extensionpay_api_key', 'extensionpay_user']);
var storage = await get(['extensionpay_api_key', 'extensionpay_user']);
// wait 10 seconds for api key to be returned if creator is running this in background.js immediately after extpay initialization
for (var i=0; i < 20; ++i) {
if (storage.extensionpay_api_key) break;
await timeout(500);
storage = await get(['extensionpay_api_key', 'extensionpay_user']);
}
if (!storage.extensionpay_api_key) throw 'Error registering user.'
const resp = await fetch(`${EXTENSION_URL}/api/user?api_key=${storage.extensionpay_api_key}`, {

@@ -1348,0 +1358,0 @@ method: 'GET',

@@ -111,6 +111,16 @@ import { runtime, management, storage, windows } from 'webextension-polyfill';

// var paid_callbacks = [];
function timeout(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function fetch_user() {
const storage = await get(['extensionpay_api_key', 'extensionpay_user']);
var storage = await get(['extensionpay_api_key', 'extensionpay_user']);
// wait 10 seconds for api key to be returned if creator is running this in background.js immediately after extpay initialization
for (var i=0; i < 20; ++i) {
if (storage.extensionpay_api_key) break;
await timeout(500);
storage = await get(['extensionpay_api_key', 'extensionpay_user']);
}
if (!storage.extensionpay_api_key) throw 'Error registering user.'
const resp = await fetch(`${EXTENSION_URL}/api/user?api_key=${storage.extensionpay_api_key}`, {

@@ -117,0 +127,0 @@ method: 'GET',

@@ -126,6 +126,16 @@ // Sign up at https://extensionpay.com to use this library. AGPLv3 licensed.

// var paid_callbacks = [];
function timeout(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function fetch_user() {
const storage = await get(['extensionpay_api_key', 'extensionpay_user'])
var storage = await get(['extensionpay_api_key', 'extensionpay_user'])
// wait 10 seconds for api key to be returned if creator is running this in background.js immediately after extpay initialization
for (var i=0; i < 20; ++i) {
if (storage.extensionpay_api_key) break;
await timeout(500)
storage = await get(['extensionpay_api_key', 'extensionpay_user'])
}
if (!storage.extensionpay_api_key) throw 'Error registering user.'
const resp = await fetch(`${EXTENSION_URL}/api/user?api_key=${storage.extensionpay_api_key}`, {

@@ -132,0 +142,0 @@ method: 'GET',

2

package.json
{
"name": "extpay",
"version": "1.1.0",
"version": "1.2.0",
"description": "The JavaScript library for https://extensionpay.com - payments for browser extensions, no server needed.",

@@ -5,0 +5,0 @@ "main": "./dist/ExtPay.common.js",

// this line is required in background.js to use ExtPay!
var extpay = ExtPay('sample-extension');
extpay.getUser().then(user => {
console.log(user)
})

@@ -1342,6 +1342,16 @@ var ExtPay = (function () {

// var paid_callbacks = [];
function timeout(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function fetch_user() {
const storage = await get(['extensionpay_api_key', 'extensionpay_user']);
var storage = await get(['extensionpay_api_key', 'extensionpay_user']);
// wait 10 seconds for api key to be returned if creator is running this in background.js immediately after extpay initialization
for (var i=0; i < 20; ++i) {
if (storage.extensionpay_api_key) break;
await timeout(500);
storage = await get(['extensionpay_api_key', 'extensionpay_user']);
}
if (!storage.extensionpay_api_key) throw 'Error registering user.'
const resp = await fetch(`${EXTENSION_URL}/api/user?api_key=${storage.extensionpay_api_key}`, {

@@ -1348,0 +1358,0 @@ method: 'GET',

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