@fuel-ts/account 0.0.0-rc-2037-20240501105750 → 0.0.0-rc-2037-20240501112942
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 +14 -15
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +14 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -19
- package/dist/index.mjs.map +1 -1
- package/dist/providers/transaction-request/transaction-request.d.ts +3 -3
- package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -1
- package/dist/providers/utils/gas.d.ts +1 -1
- package/dist/providers/utils/gas.d.ts.map +1 -1
- package/dist/test-utils.global.js +14 -15
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +14 -15
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +18 -19
- package/dist/test-utils.mjs.map +1 -1
- package/package.json +15 -15
package/dist/index.global.js
CHANGED
@@ -38645,7 +38645,7 @@ ${MessageCoinFragmentFragmentDoc}`;
|
|
38645
38645
|
}
|
38646
38646
|
var calculateGasFee = (params) => {
|
38647
38647
|
const { gas, gasPrice, priceFactor, tip } = params;
|
38648
|
-
return gas.mul(gasPrice).div(priceFactor).add(tip);
|
38648
|
+
return gas.mul(gasPrice).div(priceFactor).add(bn(tip));
|
38649
38649
|
};
|
38650
38650
|
|
38651
38651
|
// src/providers/utils/json.ts
|
@@ -38859,10 +38859,10 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
38859
38859
|
outputs,
|
38860
38860
|
witnesses
|
38861
38861
|
} = {}) {
|
38862
|
-
this.tip = bn(tip);
|
38863
|
-
this.maturity = maturity
|
38864
|
-
this.witnessLimit = witnessLimit ? bn(witnessLimit) : void 0;
|
38865
|
-
this.maxFee =
|
38862
|
+
this.tip = tip ? bn(tip) : void 0;
|
38863
|
+
this.maturity = maturity && maturity > 0 ? maturity : void 0;
|
38864
|
+
this.witnessLimit = isDefined(witnessLimit) ? bn(witnessLimit) : void 0;
|
38865
|
+
this.maxFee = bn(maxFee);
|
38866
38866
|
this.inputs = inputs ?? [];
|
38867
38867
|
this.outputs = outputs ?? [];
|
38868
38868
|
this.witnesses = witnesses ?? [];
|
@@ -38870,22 +38870,21 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
38870
38870
|
static getPolicyMeta(req) {
|
38871
38871
|
let policyTypes = 0;
|
38872
38872
|
const policies = [];
|
38873
|
-
|
38873
|
+
const { tip, witnessLimit, maturity } = req;
|
38874
|
+
if (bn(tip).gt(0)) {
|
38874
38875
|
policyTypes += PolicyType.Tip;
|
38875
|
-
policies.push({ data:
|
38876
|
+
policies.push({ data: bn(tip), type: PolicyType.Tip });
|
38876
38877
|
}
|
38877
|
-
if (
|
38878
|
+
if (isDefined(witnessLimit) && bn(witnessLimit).gte(0)) {
|
38878
38879
|
policyTypes += PolicyType.WitnessLimit;
|
38879
|
-
policies.push({ data:
|
38880
|
+
policies.push({ data: bn(witnessLimit), type: PolicyType.WitnessLimit });
|
38880
38881
|
}
|
38881
|
-
if (
|
38882
|
+
if (maturity && maturity > 0) {
|
38882
38883
|
policyTypes += PolicyType.Maturity;
|
38883
|
-
policies.push({ data:
|
38884
|
-
}
|
38885
|
-
if (req.maxFee) {
|
38886
|
-
policyTypes += PolicyType.MaxFee;
|
38887
|
-
policies.push({ data: req.maxFee, type: PolicyType.MaxFee });
|
38884
|
+
policies.push({ data: maturity, type: PolicyType.Maturity });
|
38888
38885
|
}
|
38886
|
+
policyTypes += PolicyType.MaxFee;
|
38887
|
+
policies.push({ data: req.maxFee, type: PolicyType.MaxFee });
|
38889
38888
|
return {
|
38890
38889
|
policyTypes,
|
38891
38890
|
policies
|