@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.global.js
CHANGED
@@ -289,7 +289,7 @@
|
|
289
289
|
}
|
290
290
|
return num !== null && typeof num === "object" && num.constructor.wordSize === BN2.wordSize && Array.isArray(num.words);
|
291
291
|
};
|
292
|
-
BN2.max = function
|
292
|
+
BN2.max = function max(left, right) {
|
293
293
|
if (left.cmp(right) > 0)
|
294
294
|
return left;
|
295
295
|
return right;
|
@@ -31653,21 +31653,21 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
31653
31653
|
var coinQuantityfy = (coinQuantityLike) => {
|
31654
31654
|
let assetId;
|
31655
31655
|
let amount;
|
31656
|
-
let
|
31656
|
+
let max;
|
31657
31657
|
if (Array.isArray(coinQuantityLike)) {
|
31658
31658
|
amount = coinQuantityLike[0];
|
31659
31659
|
assetId = coinQuantityLike[1] ?? BaseAssetId;
|
31660
|
-
|
31660
|
+
max = coinQuantityLike[2] ?? void 0;
|
31661
31661
|
} else {
|
31662
31662
|
amount = coinQuantityLike.amount;
|
31663
31663
|
assetId = coinQuantityLike.assetId ?? BaseAssetId;
|
31664
|
-
|
31664
|
+
max = coinQuantityLike.max ?? void 0;
|
31665
31665
|
}
|
31666
31666
|
const bnAmount = bn(amount);
|
31667
31667
|
return {
|
31668
31668
|
assetId: hexlify(assetId),
|
31669
31669
|
amount: bnAmount.lt(1) ? bn(1) : bnAmount,
|
31670
|
-
max:
|
31670
|
+
max: max ? bn(max) : void 0
|
31671
31671
|
};
|
31672
31672
|
};
|
31673
31673
|
var addAmountToCoinQuantities = (params) => {
|
@@ -32104,7 +32104,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
32104
32104
|
constructor(name, coders) {
|
32105
32105
|
const caseIndexCoder = new BigNumberCoder("u64");
|
32106
32106
|
const encodedValueSize = Object.values(coders).reduce(
|
32107
|
-
(
|
32107
|
+
(max, coder) => Math.max(max, coder.encodedLength),
|
32108
32108
|
0
|
32109
32109
|
);
|
32110
32110
|
super(`enum ${name}`, `enum ${name}`, caseIndexCoder.encodedLength + encodedValueSize);
|
@@ -32808,7 +32808,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
32808
32808
|
constructor(name, coders) {
|
32809
32809
|
const caseIndexCoder = new BigNumberCoder("u64");
|
32810
32810
|
const encodedValueSize = Object.values(coders).reduce(
|
32811
|
-
(
|
32811
|
+
(max, coder) => Math.max(max, coder.encodedLength),
|
32812
32812
|
0
|
32813
32813
|
);
|
32814
32814
|
super(`enum ${name}`, `enum ${name}`, caseIndexCoder.encodedLength + encodedValueSize);
|