@fuel-ts/account 0.0.0-rc-2021-20240418134745 → 0.0.0-rc-2021-20240418135503
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.
Potentially problematic release.
This version of @fuel-ts/account might be problematic. Click here for more details.
- package/dist/index.global.js +7 -7
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/dist/test-utils.global.js +7 -7
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +4 -4
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +4 -4
- package/dist/test-utils.mjs.map +1 -1
- package/package.json +15 -15
package/dist/index.js
CHANGED
@@ -199,21 +199,21 @@ var import_utils = require("@fuel-ts/utils");
|
|
199
199
|
var coinQuantityfy = (coinQuantityLike) => {
|
200
200
|
let assetId;
|
201
201
|
let amount;
|
202
|
-
let
|
202
|
+
let max;
|
203
203
|
if (Array.isArray(coinQuantityLike)) {
|
204
204
|
amount = coinQuantityLike[0];
|
205
205
|
assetId = coinQuantityLike[1] ?? import_configs.BaseAssetId;
|
206
|
-
|
206
|
+
max = coinQuantityLike[2] ?? void 0;
|
207
207
|
} else {
|
208
208
|
amount = coinQuantityLike.amount;
|
209
209
|
assetId = coinQuantityLike.assetId ?? import_configs.BaseAssetId;
|
210
|
-
|
210
|
+
max = coinQuantityLike.max ?? void 0;
|
211
211
|
}
|
212
212
|
const bnAmount = (0, import_math.bn)(amount);
|
213
213
|
return {
|
214
214
|
assetId: (0, import_utils.hexlify)(assetId),
|
215
215
|
amount: bnAmount.lt(1) ? (0, import_math.bn)(1) : bnAmount,
|
216
|
-
max:
|
216
|
+
max: max ? (0, import_math.bn)(max) : void 0
|
217
217
|
};
|
218
218
|
};
|
219
219
|
var addAmountToCoinQuantities = (params) => {
|