-
Notifications
You must be signed in to change notification settings - Fork 51
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
Features/improve api usdc support #16
Conversation
api/src/db/networkRevenueProvider.ts
Outdated
@@ -164,7 +179,7 @@ async function getDailyRevenue() { | |||
uakt: x.uakt, | |||
akt: uaktToAKT(x.uakt, 6), | |||
uusdc: x.uusdc, | |||
usdc: udenomToDenom(x.uusdc), | |||
usdc: udenomToDenom(x.uusdc, 6), | |||
usd: uaktToAKT(x.uakt, 6) * x.aktPrice + udenomToDenom(x.uusdc), |
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.
udenomToDenom(x.uusdc, 6)
?
</> | ||
} | ||
text="AKT spent (24h)" | ||
text="USD spent (24h)" | ||
tooltip="Last 24h" |
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.
We could add a little description saying that it adds up the value in AKT + the USDC spent
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.
Good idea 👍
</> | ||
} | ||
text="Total spent USDC" | ||
tooltip="This is the total amount of usdc spent to rent computing power on the akash network since the beginning of the network. (March 2021)" |
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.
We could change this to the beginning of the USDC support
indexer/src/index.ts
Outdated
scheduler.registerTask("Sync Blocks", syncBlocks, "7 seconds", true, { | ||
id: env.HealthChecks_SyncBlocks | ||
}); | ||
// scheduler.registerTask("Sync Blocks", syncBlocks, "7 seconds", true, { |
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.
Remove comment?
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.
Oups, yeah I'll put back all scheduled tasks as before
import { sequelize } from "@src/db/dbConnection"; | ||
import { Op } from "sequelize"; | ||
|
||
export async function updateUsdcSpending() { |
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.
updateUsdSpending
?
.next
cache to.dockerignore
for reduced image sizes in Api & Indexer@cosmjs
to latest version in indexer to remove custom code. Could not update to latest in api because since 0.30.0 the.toJSON()
method was removed. We will need to find an alternative for.toJSON()
in the api.