diff --git a/mytoncore/functions.py b/mytoncore/functions.py index 2b654dc0..4ca0c3f0 100755 --- a/mytoncore/functions.py +++ b/mytoncore/functions.py @@ -347,12 +347,15 @@ def GetBlockTimeAvg(local, timediff): def Offers(local, ton): - saveOffers = ton.GetSaveOffers() + save_offers = ton.GetSaveOffers() offers = ton.GetOffers() for offer in offers: - offerHash = offer.get("hash") - if offerHash in saveOffers: - ton.VoteOffer(offerHash) + offer_hash = offer.get("hash") + if offer_hash in save_offers: + offer_pseudohash = offer.get("pseudohash") + save_offer_pseudohash = save_offers.get(offer_hash) + if offer_pseudohash == save_offer_pseudohash and offer_pseudohash is not None: + ton.VoteOffer(offer_hash) # end define diff --git a/mytoncore/mytoncore.py b/mytoncore/mytoncore.py index b515d01b..81fe2c8c 100644 --- a/mytoncore/mytoncore.py +++ b/mytoncore/mytoncore.py @@ -1307,7 +1307,10 @@ def GetStake(self, account, args=None): stake = account.balance - 10 #end if - if stake is None and usePool: + pool_version = self.GetVersionFromCodeHash(account.codeHash) + is_single_nominator = 'spool' in pool_version + + if stake is None and usePool and not is_single_nominator: stake = account.balance - 20 if stake is None: sp = stakePercent / 100 diff --git a/setup.py b/setup.py index 26b16bd4..1d991cca 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ package_data={ 'mytoninstaller.scripts': ['*.sh'], 'mytoncore': [ - 'contracts/*', + 'contracts/**/*', 'complaints/*' ], 'mytonctrl': [