@fileverse-dev/formulajs 4.4.21-price-and-wallet-3 → 4.4.21-price-and-wallet-5
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/lib/browser/formula.js +17 -24
- package/lib/browser/formula.min.js +2 -2
- package/lib/browser/formula.min.js.map +1 -1
- package/lib/cjs/index.cjs +5 -9
- package/lib/esm/index.mjs +5 -9
- package/package.json +1 -1
package/lib/cjs/index.cjs
CHANGED
|
@@ -19195,11 +19195,12 @@ async function PRICE() {
|
|
|
19195
19195
|
url += `&time=${encodeURIComponent(input3)}`;
|
|
19196
19196
|
}
|
|
19197
19197
|
} else {
|
|
19198
|
-
const coin = input1;
|
|
19198
|
+
const coin = input1.replace(/\s+/g, "");
|
|
19199
19199
|
url += `&coin=${encodeURIComponent(coin)}`;
|
|
19200
19200
|
if (input2) {
|
|
19201
19201
|
url += `&time=${encodeURIComponent(input2)}`;
|
|
19202
|
-
|
|
19202
|
+
url += `&coin=${encodeURIComponent(coin)}`;
|
|
19203
|
+
} else if(coin.split(',') === 1) {
|
|
19203
19204
|
returnSingleValue = true;
|
|
19204
19205
|
}
|
|
19205
19206
|
}
|
|
@@ -19215,9 +19216,7 @@ async function PRICE() {
|
|
|
19215
19216
|
}
|
|
19216
19217
|
|
|
19217
19218
|
|
|
19218
|
-
const
|
|
19219
|
-
|
|
19220
|
-
const data = json.price;
|
|
19219
|
+
const data = await res.json();
|
|
19221
19220
|
|
|
19222
19221
|
if(returnSingleValue){
|
|
19223
19222
|
return data[0].price
|
|
@@ -19289,10 +19288,7 @@ async function WALLET() {
|
|
|
19289
19288
|
}
|
|
19290
19289
|
|
|
19291
19290
|
const json = await res.json();
|
|
19292
|
-
|
|
19293
|
-
return json.transactions
|
|
19294
|
-
}
|
|
19295
|
-
return json.balances
|
|
19291
|
+
return json
|
|
19296
19292
|
|
|
19297
19293
|
} catch (error) {
|
|
19298
19294
|
return errorMessageHandler(error, 'WALLET')
|
package/lib/esm/index.mjs
CHANGED
|
@@ -19193,11 +19193,12 @@ async function PRICE() {
|
|
|
19193
19193
|
url += `&time=${encodeURIComponent(input3)}`;
|
|
19194
19194
|
}
|
|
19195
19195
|
} else {
|
|
19196
|
-
const coin = input1;
|
|
19196
|
+
const coin = input1.replace(/\s+/g, "");
|
|
19197
19197
|
url += `&coin=${encodeURIComponent(coin)}`;
|
|
19198
19198
|
if (input2) {
|
|
19199
19199
|
url += `&time=${encodeURIComponent(input2)}`;
|
|
19200
|
-
|
|
19200
|
+
url += `&coin=${encodeURIComponent(coin)}`;
|
|
19201
|
+
} else if(coin.split(',') === 1) {
|
|
19201
19202
|
returnSingleValue = true;
|
|
19202
19203
|
}
|
|
19203
19204
|
}
|
|
@@ -19213,9 +19214,7 @@ async function PRICE() {
|
|
|
19213
19214
|
}
|
|
19214
19215
|
|
|
19215
19216
|
|
|
19216
|
-
const
|
|
19217
|
-
|
|
19218
|
-
const data = json.price;
|
|
19217
|
+
const data = await res.json();
|
|
19219
19218
|
|
|
19220
19219
|
if(returnSingleValue){
|
|
19221
19220
|
return data[0].price
|
|
@@ -19287,10 +19286,7 @@ async function WALLET() {
|
|
|
19287
19286
|
}
|
|
19288
19287
|
|
|
19289
19288
|
const json = await res.json();
|
|
19290
|
-
|
|
19291
|
-
return json.transactions
|
|
19292
|
-
}
|
|
19293
|
-
return json.balances
|
|
19289
|
+
return json
|
|
19294
19290
|
|
|
19295
19291
|
} catch (error) {
|
|
19296
19292
|
return errorMessageHandler(error, 'WALLET')
|
package/package.json
CHANGED