@requestnetwork/utils 0.36.1-next.1873 → 0.36.1-next.1875
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.
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js +4 -4
- package/package.json +3 -3
package/dist/providers.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ type ProviderFactory = (network: string | undefined) => providers.Provider | str
|
|
|
7
7
|
*/
|
|
8
8
|
type CurrentProviderFactory = (network: string | undefined, defaultFactory: ProviderFactory) => providers.Provider | string;
|
|
9
9
|
/**
|
|
10
|
-
* Default API_KEYS configuration, can be
|
|
10
|
+
* Default API_KEYS configuration, can be overridden using initPaymentDetectionApiKeys
|
|
11
11
|
*/
|
|
12
12
|
declare let providersApiKeys: Record<string, string | (() => string)>;
|
|
13
13
|
/**
|
package/dist/providers.js
CHANGED
|
@@ -5,11 +5,11 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const ethers_1 = require("ethers");
|
|
6
6
|
let warned = false;
|
|
7
7
|
/**
|
|
8
|
-
* Default API_KEYS configuration, can be
|
|
8
|
+
* Default API_KEYS configuration, can be overridden using initPaymentDetectionApiKeys
|
|
9
9
|
*/
|
|
10
10
|
let providersApiKeys = {
|
|
11
|
-
// fallback to Ethers
|
|
12
|
-
infura: () => process.env.RN_INFURA_KEY || '
|
|
11
|
+
// fallback to Ethers v5 default projectId
|
|
12
|
+
infura: () => process.env.RN_INFURA_KEY || '84842078b09946638c03157f83405213',
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
15
|
* @param defaultProviderOptions Default Provider Options as specified in https://docs.ethers.io/v5/api/providers/#providers-getDefaultProvider */
|
|
@@ -53,7 +53,7 @@ const defaultProviderFactory = (network) => {
|
|
|
53
53
|
if (networkRpcs[network]) {
|
|
54
54
|
return networkRpcs[network];
|
|
55
55
|
}
|
|
56
|
-
// use
|
|
56
|
+
// use Infura, if supported
|
|
57
57
|
try {
|
|
58
58
|
// try getting the URL for the given network. Will throw if not supported.
|
|
59
59
|
ethers_1.providers.InfuraProvider.getUrl(ethers_1.providers.getNetwork(network), {});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@requestnetwork/utils",
|
|
3
|
-
"version": "0.36.1-next.
|
|
3
|
+
"version": "0.36.1-next.1875+0c651b9f",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@rainbow-me/fee-suggestions": "2.1.0",
|
|
44
|
-
"@requestnetwork/types": "0.36.1-next.
|
|
44
|
+
"@requestnetwork/types": "0.36.1-next.1875+0c651b9f",
|
|
45
45
|
"eccrypto": "1.1.6",
|
|
46
46
|
"ethers": "5.5.1",
|
|
47
47
|
"secp256k1": "4.0.2",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"ts-node": "10.9.1",
|
|
58
58
|
"typescript": "4.9.5"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "0c651b9fddfb1561ffd06d81af97eed2ea28182d"
|
|
61
61
|
}
|