Socket
Socket
Sign inDemoInstall

@coinbase/wallet-sdk

Package Overview
Dependencies
Maintainers
0
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coinbase/wallet-sdk - npm Package Compare versions

Comparing version 4.0.3 to 4.0.4

5

dist/core/communicator/Communicator.js

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

this.waitForPopupLoaded = async () => {
if (this.popup && !this.popup.closed)
if (this.popup && !this.popup.closed) {
// In case the user un-focused the popup between requests, focus it again
this.popup.focus();
return this.popup;
}
this.popup = (0, util_1.openPopup)(this.url);

@@ -75,0 +78,0 @@ this.onMessage(({ event }) => event === 'PopupUnload')

21

dist/util/provider.js

@@ -25,5 +25,18 @@ "use strict";

exports.getCoinbaseInjectedSigner = getCoinbaseInjectedSigner;
function getCoinbaseInjectedLegacyProvider() {
const window = globalThis;
return window.coinbaseWalletExtension;
}
function getInjectedEthereum() {
var _a, _b;
try {
const window = globalThis;
return (_a = window.ethereum) !== null && _a !== void 0 ? _a : (_b = window.top) === null || _b === void 0 ? void 0 : _b.ethereum;
}
catch (_c) {
return undefined;
}
}
function getCoinbaseInjectedProvider({ metadata, preference, }) {
var _a, _b, _c;
const window = globalThis;
var _a;
if (preference.options !== 'smartWalletOnly') {

@@ -33,3 +46,3 @@ const signer = getCoinbaseInjectedSigner();

return undefined; // use signer instead
const extension = window.coinbaseWalletExtension;
const extension = getCoinbaseInjectedLegacyProvider();
if (extension) {

@@ -41,3 +54,3 @@ const { appName, appLogoUrl, appChainIds } = metadata;

}
const ethereum = (_b = window.ethereum) !== null && _b !== void 0 ? _b : (_c = window.top) === null || _c === void 0 ? void 0 : _c.ethereum;
const ethereum = getInjectedEthereum();
if (ethereum === null || ethereum === void 0 ? void 0 : ethereum.isCoinbaseBrowser) {

@@ -44,0 +57,0 @@ return ethereum;

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

export declare const LIB_VERSION = "4.0.3";
export declare const LIB_VERSION = "4.0.4";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LIB_VERSION = void 0;
exports.LIB_VERSION = '4.0.3';
exports.LIB_VERSION = '4.0.4';
{
"name": "@coinbase/wallet-sdk",
"version": "4.0.3",
"version": "4.0.4",
"description": "Coinbase Wallet JavaScript SDK",

@@ -5,0 +5,0 @@ "keywords": [

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