wagmi 0.5.11 → 0.5.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ // are you seeing an error that a default export doesn't exist but your source file has a default export?
2
+ // you should run `yarn` or `yarn preconstruct dev` if preconstruct dev isn't in your postinstall hook
3
+
4
+ // curious why you need to?
5
+ // this file exists so that you can import from the entrypoint normally
6
+ // except that it points to your source file and you don't need to run build constantly
7
+ // which means we need to re-export all of the modules from your source file
8
+ // and since export * doesn't include default exports, we need to read your source file
9
+ // to check for a default export and re-export it if it exists
10
+ // it's not ideal, but it works pretty well ¯\_(ツ)_/¯
11
+ export * from "../../../src/connectors/mock";
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ // this file might look strange and you might be wondering what it's for
3
+ // it's lets you import your source files by importing this entrypoint
4
+ // as you would import it if it was built with preconstruct build
5
+ // this file is slightly different to some others though
6
+ // it has a require hook which compiles your code with Babel
7
+ // this means that you don't have to set up @babel/register or anything like that
8
+ // but you can still require this module and it'll be compiled
9
+
10
+ // this bit of code imports the require hook and registers it
11
+ let unregister = require("../../../../../node_modules/.pnpm/@preconstruct+hook@0.4.0/node_modules/@preconstruct/hook").___internalHook(typeof __dirname === 'undefined' ? undefined : __dirname, "../../../../..", "../../..");
12
+
13
+ // this re-exports the source file
14
+ module.exports = require("../../../src/connectors/mock.ts");
15
+
16
+ unregister();
@@ -1374,6 +1374,8 @@ const queryKeyHashFn$1 = _ref2 => {
1374
1374
  };
1375
1375
 
1376
1376
  const queryFn$7 = async _ref3 => {
1377
+ var _await$readContract;
1378
+
1377
1379
  let {
1378
1380
  queryKey: [{
1379
1381
  addressOrName,
@@ -1384,14 +1386,14 @@ const queryFn$7 = async _ref3 => {
1384
1386
  overrides
1385
1387
  }]
1386
1388
  } = _ref3;
1387
- return (await core.readContract({
1389
+ return (_await$readContract = await core.readContract({
1388
1390
  addressOrName,
1389
1391
  args,
1390
1392
  chainId,
1391
1393
  contractInterface,
1392
1394
  functionName,
1393
1395
  overrides
1394
- })) || null;
1396
+ })) !== null && _await$readContract !== void 0 ? _await$readContract : null;
1395
1397
  };
1396
1398
 
1397
1399
  function useContractRead(_ref4) {
@@ -1374,6 +1374,8 @@ const queryKeyHashFn$1 = _ref2 => {
1374
1374
  };
1375
1375
 
1376
1376
  const queryFn$7 = async _ref3 => {
1377
+ var _await$readContract;
1378
+
1377
1379
  let {
1378
1380
  queryKey: [{
1379
1381
  addressOrName,
@@ -1384,14 +1386,14 @@ const queryFn$7 = async _ref3 => {
1384
1386
  overrides
1385
1387
  }]
1386
1388
  } = _ref3;
1387
- return (await core.readContract({
1389
+ return (_await$readContract = await core.readContract({
1388
1390
  addressOrName,
1389
1391
  args,
1390
1392
  chainId,
1391
1393
  contractInterface,
1392
1394
  functionName,
1393
1395
  overrides
1394
- })) || null;
1396
+ })) !== null && _await$readContract !== void 0 ? _await$readContract : null;
1395
1397
  };
1396
1398
 
1397
1399
  function useContractRead(_ref4) {
package/dist/wagmi.esm.js CHANGED
@@ -1350,6 +1350,8 @@ const queryKeyHashFn$1 = _ref2 => {
1350
1350
  };
1351
1351
 
1352
1352
  const queryFn$7 = async _ref3 => {
1353
+ var _await$readContract;
1354
+
1353
1355
  let {
1354
1356
  queryKey: [{
1355
1357
  addressOrName,
@@ -1360,14 +1362,14 @@ const queryFn$7 = async _ref3 => {
1360
1362
  overrides
1361
1363
  }]
1362
1364
  } = _ref3;
1363
- return (await readContract({
1365
+ return (_await$readContract = await readContract({
1364
1366
  addressOrName,
1365
1367
  args,
1366
1368
  chainId,
1367
1369
  contractInterface,
1368
1370
  functionName,
1369
1371
  overrides
1370
- })) || null;
1372
+ })) !== null && _await$readContract !== void 0 ? _await$readContract : null;
1371
1373
  };
1372
1374
 
1373
1375
  function useContractRead(_ref4) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "wagmi",
3
3
  "description": "React Hooks for Ethereum",
4
4
  "license": "WAGMIT",
5
- "version": "0.5.11",
5
+ "version": "0.5.12",
6
6
  "repository": "wagmi-dev/wagmi",
7
7
  "author": "awkweb.eth",
8
8
  "homepage": "https://wagmi.sh",