Remove some debugging code from Transactions and TrueLayer
This commit is contained in:
parent
95e9a55f19
commit
75b005485f
|
@ -33,13 +33,10 @@ class TrueLayer(util.Base):
|
||||||
Data type: {"monzo": refresh_token,
|
Data type: {"monzo": refresh_token,
|
||||||
"revolut": refresh_token}
|
"revolut": refresh_token}
|
||||||
"""
|
"""
|
||||||
print("ADD REFRESH TOKEN", refresh_token)
|
|
||||||
account = self.current_authcode_account
|
account = self.current_authcode_account
|
||||||
if not account:
|
if not account:
|
||||||
print("CURRENT AUTHCODE ACCOUNT", account)
|
|
||||||
return False
|
return False
|
||||||
existing_entry = loads(settings.TrueLayer.RefreshKeys)
|
existing_entry = loads(settings.TrueLayer.RefreshKeys)
|
||||||
print("existing entry", existing_entry)
|
|
||||||
existing_entry[account] = refresh_token
|
existing_entry[account] = refresh_token
|
||||||
settings.TrueLayer.RefreshKeys = dumps(existing_entry)
|
settings.TrueLayer.RefreshKeys = dumps(existing_entry)
|
||||||
settings.write()
|
settings.write()
|
||||||
|
@ -67,7 +64,6 @@ class TrueLayer(util.Base):
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
auth_uri = f"{settings.TrueLayer.AuthBase}/?{query}&redirect_uri={settings.TrueLayer.CallbackURL}"
|
auth_uri = f"{settings.TrueLayer.AuthBase}/?{query}&redirect_uri={settings.TrueLayer.CallbackURL}"
|
||||||
print("SETTING AUTHCODE ACCOUNT TO", account)
|
|
||||||
self.current_authcode_account = account
|
self.current_authcode_account = account
|
||||||
return auth_uri
|
return auth_uri
|
||||||
|
|
||||||
|
@ -104,11 +100,8 @@ class TrueLayer(util.Base):
|
||||||
self.log.info(f"Retrieved access/refresh tokens for {self.current_authcode_account}")
|
self.log.info(f"Retrieved access/refresh tokens for {self.current_authcode_account}")
|
||||||
|
|
||||||
def get_new_tokens_all(self):
|
def get_new_tokens_all(self):
|
||||||
print("get new_tokens_all running")
|
|
||||||
refresh_list = loads(settings.TrueLayer.RefreshKeys)
|
refresh_list = loads(settings.TrueLayer.RefreshKeys)
|
||||||
|
|
||||||
for account in refresh_list:
|
for account in refresh_list:
|
||||||
print("new_new_tokens_all running on", account)
|
|
||||||
self.get_new_token(account)
|
self.get_new_token(account)
|
||||||
|
|
||||||
def get_new_token(self, account):
|
def get_new_token(self, account):
|
||||||
|
|
|
@ -90,7 +90,6 @@ class Transactions(util.Base):
|
||||||
if not stored_trade:
|
if not stored_trade:
|
||||||
self.log.error(f"Could not find entry in DB for typeless transaction: {txid}")
|
self.log.error(f"Could not find entry in DB for typeless transaction: {txid}")
|
||||||
return
|
return
|
||||||
print("BEFORE CONVERT STORED TRADE", stored_trade)
|
|
||||||
stored_trade = util.convert(stored_trade)
|
stored_trade = util.convert(stored_trade)
|
||||||
if "old_state" in inside:
|
if "old_state" in inside:
|
||||||
if "new_state" in inside:
|
if "new_state" in inside:
|
||||||
|
|
Loading…
Reference in New Issue