@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
|
@@ -3980,13 +3980,28 @@ var StakingReadWrite = /*#__PURE__*/function (_StakingRead) {
|
|
|
3980
3980
|
|
|
3981
3981
|
_proto2.unstake = /*#__PURE__*/function () {
|
|
3982
3982
|
var _unstake = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(amount) {
|
|
3983
|
+
var msgSender, amountInput, stakedAmount, unstakeAmount;
|
|
3983
3984
|
return runtime_1.wrap(function _callee6$(_context6) {
|
|
3984
3985
|
while (1) {
|
|
3985
3986
|
switch (_context6.prev = _context6.next) {
|
|
3986
3987
|
case 0:
|
|
3987
|
-
|
|
3988
|
+
_context6.next = 2;
|
|
3989
|
+
return this._networkConnection.signer.getAddress();
|
|
3988
3990
|
|
|
3989
|
-
case
|
|
3991
|
+
case 2:
|
|
3992
|
+
msgSender = _context6.sent;
|
|
3993
|
+
amountInput = ethers.BigNumber.from(amount.rawAmount());
|
|
3994
|
+
_context6.t0 = ethers.BigNumber;
|
|
3995
|
+
_context6.next = 7;
|
|
3996
|
+
return this.stakeBalanceOf(msgSender);
|
|
3997
|
+
|
|
3998
|
+
case 7:
|
|
3999
|
+
_context6.t1 = _context6.sent.rawAmount();
|
|
4000
|
+
stakedAmount = _context6.t0.from.call(_context6.t0, _context6.t1);
|
|
4001
|
+
unstakeAmount = amountInput.lt(stakedAmount) ? amountInput : stakedAmount.sub(1);
|
|
4002
|
+
return _context6.abrupt("return", this._auriFairLaunch.connect(this._networkConnection.signer).withdraw(PLYWNEAR_POOL_ID, unstakeAmount));
|
|
4003
|
+
|
|
4004
|
+
case 11:
|
|
3990
4005
|
case "end":
|
|
3991
4006
|
return _context6.stop();
|
|
3992
4007
|
}
|