@eluvio/elv-client-js 4.0.7 → 4.0.8
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/package.json +1 -1
- package/src/Crypto.js +2 -2
- package/src/ElvClient.js +2 -2
- package/src/Utils.js +1 -1
- package/src/client/Files.js +1 -1
- package/src/walletClient/Utils.js +2 -2
package/package.json
CHANGED
package/src/Crypto.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
if(typeof globalThis.Buffer === "undefined") { globalThis.Buffer = require("buffer/").Buffer; }
|
|
2
2
|
|
|
3
3
|
const bs58 = require("bs58");
|
|
4
4
|
const Stream = require("stream");
|
|
@@ -7,7 +7,7 @@ const Utils = require("./Utils");
|
|
|
7
7
|
if(typeof crypto === "undefined") {
|
|
8
8
|
const crypto = require("crypto");
|
|
9
9
|
crypto.getRandomValues = arr => crypto.randomBytes(arr.length);
|
|
10
|
-
|
|
10
|
+
globalThis.crypto = crypto;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
let ElvCrypto;
|
package/src/ElvClient.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
if(typeof globalThis.Buffer === "undefined") { globalThis.Buffer = require("buffer/").Buffer; }
|
|
2
2
|
|
|
3
3
|
const URI = require("urijs");
|
|
4
4
|
const Ethers = require("ethers");
|
|
@@ -31,7 +31,7 @@ const networks = {
|
|
|
31
31
|
if(Utils.Platform() === Utils.PLATFORM_NODE) {
|
|
32
32
|
// Define Response in node
|
|
33
33
|
// eslint-disable-next-line no-global-assign
|
|
34
|
-
|
|
34
|
+
globalThis.Response = (require("node-fetch")).Response;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
/**
|
package/src/Utils.js
CHANGED
package/src/client/Files.js
CHANGED
|
@@ -10,7 +10,7 @@ let fs;
|
|
|
10
10
|
if(Utils.Platform() === Utils.PLATFORM_NODE) {
|
|
11
11
|
// Define Response in node
|
|
12
12
|
// eslint-disable-next-line no-global-assign
|
|
13
|
-
|
|
13
|
+
globalThis.Response = (require("node-fetch")).Response;
|
|
14
14
|
fs = require("fs");
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -55,8 +55,8 @@ const FormatNFTDetails = function(entry) {
|
|
|
55
55
|
USDCOnly: !!paymentAccounts.find(entry => entry.preferred),
|
|
56
56
|
EthUSDCAccepted: !!paymentAccounts.find(account => account.type === "eth"),
|
|
57
57
|
EthUSDCOnly: !!paymentAccounts.find(account => account.type === "eth" && account.preferred),
|
|
58
|
-
SolUSDCAccepted: !!paymentAccounts.find(account => account.type === "
|
|
59
|
-
SolUSDCOnly: !!paymentAccounts.find(account => account.type === "
|
|
58
|
+
SolUSDCAccepted: !!paymentAccounts.find(account => account.type === "sol"),
|
|
59
|
+
SolUSDCOnly: !!paymentAccounts.find(account => account.type === "sol" && account.preferred),
|
|
60
60
|
|
|
61
61
|
TenantId: entry.tenant || entry.tenant_id,
|
|
62
62
|
ContractAddr: info.contract_addr,
|