@upcoming/bee-js 0.5.4 → 0.5.5
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/cjs/bee.js +0 -1
- package/dist/cjs/modules/debug/states.js +1 -1
- package/dist/cjs/utils/tokens.js +10 -10
- package/dist/index.browser.min.js +1 -1
- package/dist/index.browser.min.js.map +1 -1
- package/dist/mjs/bee.js +0 -1
- package/dist/mjs/modules/debug/states.js +1 -1
- package/dist/mjs/utils/tokens.js +10 -10
- package/dist/types/types/debug.d.ts +1 -1
- package/package.json +2 -2
package/dist/cjs/bee.js
CHANGED
|
@@ -1293,7 +1293,6 @@ class Bee {
|
|
|
1293
1293
|
if (options) {
|
|
1294
1294
|
options = (0, type_1.prepareTransactionOptions)(options);
|
|
1295
1295
|
}
|
|
1296
|
-
// TODO: Add test for response
|
|
1297
1296
|
return stake.stake(this.getRequestOptionsForCall(requestOptions), amountString, options);
|
|
1298
1297
|
}
|
|
1299
1298
|
/**
|
|
@@ -43,7 +43,7 @@ async function getChainState(requestOptions) {
|
|
|
43
43
|
block: cafe_utility_1.Types.asNumber(body.block, { name: 'block' }),
|
|
44
44
|
chainTip: cafe_utility_1.Types.asNumber(body.chainTip, { name: 'chainTip' }),
|
|
45
45
|
totalAmount: (0, type_1.asNumberString)(body.totalAmount, { name: 'totalAmount' }),
|
|
46
|
-
currentPrice:
|
|
46
|
+
currentPrice: cafe_utility_1.Types.asNumber(body.currentPrice, { name: 'currentPrice' }),
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
exports.getChainState = getChainState;
|
package/dist/cjs/utils/tokens.js
CHANGED
|
@@ -52,19 +52,19 @@ class BZZ {
|
|
|
52
52
|
return new BZZ(this.state.divide(other)[0]);
|
|
53
53
|
}
|
|
54
54
|
gt(other) {
|
|
55
|
-
return this.state.
|
|
55
|
+
return this.state.compare(other.state) === 1;
|
|
56
56
|
}
|
|
57
57
|
gte(other) {
|
|
58
|
-
return this.state.
|
|
58
|
+
return this.state.compare(other.state) !== -1;
|
|
59
59
|
}
|
|
60
60
|
lt(other) {
|
|
61
|
-
return this.state.
|
|
61
|
+
return this.state.compare(other.state) === -1;
|
|
62
62
|
}
|
|
63
63
|
lte(other) {
|
|
64
|
-
return this.state.
|
|
64
|
+
return this.state.compare(other.state) !== 1;
|
|
65
65
|
}
|
|
66
66
|
eq(other) {
|
|
67
|
-
return this.state.
|
|
67
|
+
return this.state.compare(other.state) === 0;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
exports.BZZ = BZZ;
|
|
@@ -119,19 +119,19 @@ class DAI {
|
|
|
119
119
|
return new DAI(this.state.divide(other)[0]);
|
|
120
120
|
}
|
|
121
121
|
gt(other) {
|
|
122
|
-
return this.state.
|
|
122
|
+
return this.state.compare(other.state) === 1;
|
|
123
123
|
}
|
|
124
124
|
gte(other) {
|
|
125
|
-
return this.state.
|
|
125
|
+
return this.state.compare(other.state) !== -1;
|
|
126
126
|
}
|
|
127
127
|
lt(other) {
|
|
128
|
-
return this.state.
|
|
128
|
+
return this.state.compare(other.state) === -1;
|
|
129
129
|
}
|
|
130
130
|
lte(other) {
|
|
131
|
-
return this.state.
|
|
131
|
+
return this.state.compare(other.state) !== 1;
|
|
132
132
|
}
|
|
133
133
|
eq(other) {
|
|
134
|
-
return this.state.
|
|
134
|
+
return this.state.compare(other.state) === 0;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
exports.DAI = DAI;
|