-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove price calculation #1762
Remove price calculation #1762
Conversation
c9640a7
to
225cdc9
Compare
47fb133
to
dacb44b
Compare
@Uxio0 this shouln´t be included on the next release until 30th November but could be in staging until that day. |
@@ -72,6 +67,11 @@ def get_price_address(self) -> ChecksumAddress: | |||
return self.token_address | |||
|
|||
|
|||
class FiatCode(Enum): | |||
USD = 1 | |||
EUR = 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this Enum class while we keep balance with price. I think that we should do this in other issue because this needs to be coordinated with clients, for example safe-client-gateway.
round(123.4 * 0.4 * (tokens_value / 1e18), 4), | ||
round(123.4 * 0.4, 4), | ||
0.0, | ||
datetime.datetime.utcfromtimestamp(0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From clients atre expected a date, how we cannot say when was calculated I decided to put epoch 0.
0.0, | ||
datetime.utcfromtimestamp(0), | ||
0.0, | ||
0.0, | ||
FiatCode.USD.name, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hectorgomezv just to inform you, the transaction service will return eth_value
as 0, timestamp
when was calculated as 1970-01... (epoch 0), fiat_balance
0 and fiat_conversion
as 0.
This is affecting the endpoint /v1/safes/{address}/balances/usd/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @moisses89! No problem at all from the CGW perspective, the service is not using that endpoint anymore.
Closes #1758