@learncard/ethereum-plugin 1.1.31 → 1.1.33
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/dist/ethereum-plugin.cjs.development.cjs +10 -5
- package/dist/ethereum-plugin.cjs.development.cjs.map +2 -2
- package/dist/ethereum-plugin.cjs.production.min.cjs +1 -1
- package/dist/ethereum-plugin.cjs.production.min.cjs.map +3 -3
- package/dist/ethereum-plugin.esm.js +10 -5
- package/dist/ethereum-plugin.esm.js.map +2 -2
- package/dist/helpers.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +6 -10
|
@@ -3617,7 +3617,10 @@ var require_bn = __commonJS({
|
|
|
3617
3617
|
this.words[i] = carry;
|
|
3618
3618
|
this.length++;
|
|
3619
3619
|
}
|
|
3620
|
-
|
|
3620
|
+
if (num === 0) {
|
|
3621
|
+
this.length = 1;
|
|
3622
|
+
this._normSign();
|
|
3623
|
+
}
|
|
3621
3624
|
return isNegNum ? this.ineg() : this;
|
|
3622
3625
|
}, "imuln");
|
|
3623
3626
|
BN3.prototype.muln = /* @__PURE__ */ __name(function muln(num) {
|
|
@@ -4010,12 +4013,14 @@ var require_bn = __commonJS({
|
|
|
4010
4013
|
BN3.prototype.divRound = /* @__PURE__ */ __name(function divRound(num) {
|
|
4011
4014
|
var dm = this.divmod(num);
|
|
4012
4015
|
if (dm.mod.isZero()) return dm.div;
|
|
4013
|
-
var mod = dm.
|
|
4014
|
-
var half = num.
|
|
4015
|
-
var r2 = num.
|
|
4016
|
+
var mod = dm.mod.abs();
|
|
4017
|
+
var half = num.abs().iushrn(1);
|
|
4018
|
+
var r2 = num.words[0] & 1;
|
|
4016
4019
|
var cmp = mod.cmp(half);
|
|
4017
4020
|
if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;
|
|
4018
|
-
|
|
4021
|
+
var up = new BN3(1);
|
|
4022
|
+
up.negative = this.negative ^ num.negative;
|
|
4023
|
+
return dm.div.iadd(up);
|
|
4019
4024
|
}, "divRound");
|
|
4020
4025
|
BN3.prototype.modrn = /* @__PURE__ */ __name(function modrn(num) {
|
|
4021
4026
|
var isNegNum = num < 0;
|