Skip to content

Commit f06bb4f

Browse files
committed
Revert "keep staking from deleting existing staketimes"
This reverts commit 1d03d6b.
1 parent 5614b93 commit f06bb4f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

contract-shared-headers/eosdactokens_shared.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ namespace eosdac {
166166
}
167167
}
168168

169-
asset get_liquid(name owner, name code, symbol sym, bool readonly = false) {
169+
asset get_liquid(name owner, name code, symbol sym) {
170170
// Hardcoding a precision of 4, it doesnt matter because the index ignores precision
171171
dacdir::dac dac = dacdir::dac_for_symbol(extended_symbol{sym, code});
172172

@@ -176,7 +176,7 @@ namespace eosdac {
176176

177177
asset liquid = get_balance(owner, code, sym.code());
178178

179-
auto canDeleteStakeTime = !readonly;
179+
auto canDeleteStakeTime = true;
180180

181181
auto existing_stake = stakes.find(owner.value);
182182
if (existing_stake != stakes.end()) {

contracts/eosdactokens/eosdactokens.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ namespace eosdac {
311311
check(quantity.is_valid(), "ERR::STAKE_INVALID_QTY::Invalid quantity supplied");
312312
check(quantity.amount > 0, "ERR::STAKE_NON_POSITIVE_QTY::Stake amount must be greater than 0");
313313

314-
auto liquid = eosdac::get_liquid(account, get_self(), quantity.symbol, true);
314+
auto liquid = eosdac::get_liquid(account, get_self(), quantity.symbol);
315315

316316
check(liquid >= quantity, "ERR::STAKE_MORE_LIQUID::Attempting to stake %s but your liquid balance is only %s",
317317
quantity, liquid);

0 commit comments

Comments
 (0)