depay-blockchain-client
Advanced tools
Comparing version 2.3.1 to 2.3.2
@@ -8,6 +8,2 @@ 'use strict'; | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var ethers__default = /*#__PURE__*/_interopDefaultLegacy(ethers); | ||
function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }let getWindow = () => { | ||
@@ -82,5 +78,5 @@ if (typeof global == 'object') return global | ||
if (account) { | ||
provider = await new ethers__default['default'].providers.Web3Provider(window.ethereum); | ||
provider = await new ethers.ethers.providers.Web3Provider(window.ethereum); | ||
} else { | ||
provider = await new ethers__default['default'].providers.JsonRpcProvider( | ||
provider = await new ethers.ethers.providers.JsonRpcProvider( | ||
['https://mainnet.infu', 'ra.io/v3/9aa3d95b3bc440fa8', '8ea12eaa4456161'].join(''), | ||
@@ -108,3 +104,3 @@ ); | ||
let contractCall = ({ address, api, method, params, provider }) => { | ||
let contract = new ethers__default['default'].Contract(address, api, provider); | ||
let contract = new ethers.ethers.Contract(address, api, provider); | ||
let args = paramsToContractArgs({ contract, method, params }); | ||
@@ -111,0 +107,0 @@ return contract[method](...args) |
@@ -1,2 +0,2 @@ | ||
import ethers, { ethers as ethers$1 } from 'ethers'; | ||
import { ethers } from 'ethers'; | ||
import { getWallet } from 'depay-crypto-wallets'; | ||
@@ -149,6 +149,6 @@ | ||
let provider = new ethers$1.providers.Web3Provider(window.ethereum); | ||
let provider = new ethers.providers.Web3Provider(window.ethereum); | ||
let signer = provider.getSigner(); | ||
let contract = new ethers$1.Contract(address, api, provider); | ||
let contract = new ethers.Contract(address, api, provider); | ||
let args = paramsToContractArgs({ contract, method, params }); | ||
@@ -155,0 +155,0 @@ return contract.connect(signer).estimateGas[method](...args) |
@@ -7,6 +7,2 @@ (function (global, factory) { | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var ethers__default = /*#__PURE__*/_interopDefaultLegacy(ethers); | ||
function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }let getWindow = () => { | ||
@@ -81,5 +77,5 @@ if (typeof global == 'object') return global | ||
if (account) { | ||
provider = await new ethers__default['default'].providers.Web3Provider(window.ethereum); | ||
provider = await new ethers.ethers.providers.Web3Provider(window.ethereum); | ||
} else { | ||
provider = await new ethers__default['default'].providers.JsonRpcProvider( | ||
provider = await new ethers.ethers.providers.JsonRpcProvider( | ||
['https://mainnet.infu', 'ra.io/v3/9aa3d95b3bc440fa8', '8ea12eaa4456161'].join(''), | ||
@@ -107,3 +103,3 @@ ); | ||
let contractCall = ({ address, api, method, params, provider }) => { | ||
let contract = new ethers__default['default'].Contract(address, api, provider); | ||
let contract = new ethers.ethers.Contract(address, api, provider); | ||
let args = paramsToContractArgs({ contract, method, params }); | ||
@@ -110,0 +106,0 @@ return contract[method](...args) |
{ | ||
"name": "depay-blockchain-client", | ||
"moduleName": "BlockchainClient", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"description": "A client to fetch blockchain data by either using the connected wallet or falling back to e.g. RPC.", | ||
@@ -6,0 +6,0 @@ "main": "dist/cjs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
73967
457