Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions components/profile/pages/voting-power/oracles/actions/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ export default function OraclesActionsView({
? "text-purple"
: "text-primary"
}`}
data-testid={t("my-oracles:fields.amount.label", {
currency: currentLabel
})}
data-testid="oracle-actions-input"
max={wallet?.balance?.bepro?.toFixed()}
error={!!error}
value={tokenAmount}
Expand All @@ -94,18 +92,25 @@ export default function OraclesActionsView({
<If
condition={!isBalanceLoading}
otherwise={
<span className="spinner-border spinner-border-xs ml-1" />
<span
className="spinner-border spinner-border-xs ml-1"
data-testid="oracle-actions-loading-balance"
/>
}
>
<If condition={!disabled}>
{formatStringToCurrency(getMaxAmount())}{" "}
{currentLabel} {t("misc.available")}
<span onClick={handleMaxAmount}
className={`caption-small ml-1 cursor-pointer text-uppercase ${(
currentLabel === t("$oracles", { token: networkTokenSymbol })
? "text-purple"
: "text-primary"
)}`}>
<span
onClick={handleMaxAmount}
role="button"
data-testid="oracles-actions-max-button"
className={`caption-small ml-1 cursor-pointer text-uppercase ${(
currentLabel === t("$oracles", { token: networkTokenSymbol })
? "text-purple"
: "text-primary"
)}`}
>
{t("misc.max")}
</span>
{error && <p className="p-small my-2">{error}</p>}
Expand Down
4 changes: 2 additions & 2 deletions pages/api/search/users/total.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import {NextApiRequest, NextApiResponse} from "next";

import models from "db/models";

import { withCORS } from "middleware";
import {withCORS} from "middleware";

async function getTotal() {
export async function getTotal() {
return models.user.count();
}

Expand Down
2 changes: 0 additions & 2 deletions server/common/check-prices/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ export default async function post(req: NextApiRequest) {
_chainTokens[chainId.toString()] =
[... (_chainTokens[chainId.toString()] || []), address];

console.log(`\n\n\n`,_chainTokens,`\n\n\n`)

for (const [, addresses] of Object.entries(_chainTokens))
dbTokens.push(... (await models.tokens.findAll({
// raw: true,
Expand Down
2 changes: 1 addition & 1 deletion x-hooks/api/get-explore-page-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import {ParsedUrlQuery} from "querystring";

import {ExplorePageProps} from "types/pages";

import {getTotal as getTotalUsers} from "../../pages/api/search/users/total";
import getConvertedAmounts from "../../server/common/overview/converted-amounts";
import getBounties from "../../server/common/search/tasks";
import getTotalUsers from "../../server/common/search/total";

/**
* Get explore page data from api based on the current url query
Expand Down