@aurigami/sdk 1.5.9 → 1.5.10
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/sdk.cjs.development.js +17 -2
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +17 -2
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/Staking.ts +10 -1
package/dist/sdk.esm.js
CHANGED
|
@@ -3978,13 +3978,28 @@ var StakingReadWrite = /*#__PURE__*/function (_StakingRead) {
|
|
|
3978
3978
|
|
|
3979
3979
|
_proto2.unstake = /*#__PURE__*/function () {
|
|
3980
3980
|
var _unstake = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(amount) {
|
|
3981
|
+
var msgSender, amountInput, stakedAmount, unstakeAmount;
|
|
3981
3982
|
return runtime_1.wrap(function _callee6$(_context6) {
|
|
3982
3983
|
while (1) {
|
|
3983
3984
|
switch (_context6.prev = _context6.next) {
|
|
3984
3985
|
case 0:
|
|
3985
|
-
|
|
3986
|
+
_context6.next = 2;
|
|
3987
|
+
return this._networkConnection.signer.getAddress();
|
|
3986
3988
|
|
|
3987
|
-
case
|
|
3989
|
+
case 2:
|
|
3990
|
+
msgSender = _context6.sent;
|
|
3991
|
+
amountInput = BigNumber$1.from(amount.rawAmount());
|
|
3992
|
+
_context6.t0 = BigNumber$1;
|
|
3993
|
+
_context6.next = 7;
|
|
3994
|
+
return this.stakeBalanceOf(msgSender);
|
|
3995
|
+
|
|
3996
|
+
case 7:
|
|
3997
|
+
_context6.t1 = _context6.sent.rawAmount();
|
|
3998
|
+
stakedAmount = _context6.t0.from.call(_context6.t0, _context6.t1);
|
|
3999
|
+
unstakeAmount = amountInput.lt(stakedAmount) ? amountInput : stakedAmount.sub(1);
|
|
4000
|
+
return _context6.abrupt("return", this._auriFairLaunch.connect(this._networkConnection.signer).withdraw(PLYWNEAR_POOL_ID, unstakeAmount));
|
|
4001
|
+
|
|
4002
|
+
case 11:
|
|
3988
4003
|
case "end":
|
|
3989
4004
|
return _context6.stop();
|
|
3990
4005
|
}
|