mining working again

This commit is contained in:
Richard
2024-01-25 19:57:49 +01:00
parent d8eb1c4954
commit f913d23c06
6 changed files with 82 additions and 57 deletions

View File

@@ -18,6 +18,11 @@ class Survey(Base):
def ext(cls):
return 'svy'
def get_waypoint(self):
sym = '-'.join(self.symbol.split('-')[:3])
return self.store.get('Waypoint', sym, create=True)
def is_expired(self):
return time() > self.expires or self.exhausted
@@ -28,7 +33,7 @@ class Survey(Base):
def api_dict(self):
return {
'signature': self.symbol,
'symbol': self.waypoint,
'symbol': self.waypoint.symbol,
'deposits': [{'symbol': d} for d in self.deposits],
'expiration': self.expires_str,
'size': size_names[self.size]