@fuel-ts/account 0.88.0 → 0.88.1
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
CHANGED
@@ -29472,7 +29472,7 @@ spurious results.`);
|
|
29472
29472
|
return {
|
29473
29473
|
FORC: "0.59.0",
|
29474
29474
|
FUEL_CORE: "0.26.0",
|
29475
|
-
FUELS: "0.88.
|
29475
|
+
FUELS: "0.88.1"
|
29476
29476
|
};
|
29477
29477
|
}
|
29478
29478
|
function parseVersion(version) {
|
@@ -31175,7 +31175,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
31175
31175
|
coders;
|
31176
31176
|
#caseIndexCoder;
|
31177
31177
|
#encodedValueSize;
|
31178
|
-
#
|
31178
|
+
#shouldValidateLength;
|
31179
31179
|
constructor(name, coders) {
|
31180
31180
|
const caseIndexCoder = new BigNumberCoder("u64");
|
31181
31181
|
const encodedValueSize = Object.values(coders).reduce(
|
@@ -31187,7 +31187,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
31187
31187
|
this.coders = coders;
|
31188
31188
|
this.#caseIndexCoder = caseIndexCoder;
|
31189
31189
|
this.#encodedValueSize = encodedValueSize;
|
31190
|
-
this.#
|
31190
|
+
this.#shouldValidateLength = !(this.type === OPTION_CODER_TYPE || hasNestedOption(coders));
|
31191
31191
|
}
|
31192
31192
|
#encodeNativeEnum(value) {
|
31193
31193
|
const valueCoder = this.coders[value];
|
@@ -31216,7 +31216,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
31216
31216
|
return [caseKey, newOffset];
|
31217
31217
|
}
|
31218
31218
|
decode(data, offset) {
|
31219
|
-
if (
|
31219
|
+
if (this.#shouldValidateLength && data.length < this.#encodedValueSize) {
|
31220
31220
|
throw new FuelError(ErrorCode.DECODE_ERROR, `Invalid enum data size.`);
|
31221
31221
|
}
|
31222
31222
|
const caseBytes = new BigNumberCoder("u64").decode(data, offset)[0];
|