Skip to content

Commit

Permalink
refactor(dcellar-web-ui): update sp-meta field
Browse files Browse the repository at this point in the history
  • Loading branch information
aiden-cao committed Apr 11, 2024
1 parent 555281e commit 7ffc3cc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const OptionItem = memo(function OptionItem({
{meta && meta.FreeReadQuota ? formatBytes(meta.FreeReadQuota) : '--'}
</TD>
<TD w={144} color={textColor}>
{meta && meta.FreeMonthlyQuota ? formatBytes(meta.FreeMonthlyQuota) : '--'}
{meta && meta.MonthlyFreeQuota ? formatBytes(meta.MonthlyFreeQuota) : '--'}
</TD>
<TD $dot={access ? spLatency : 0} color={textColor}>
{access && spLatency ? `${spLatency}ms` : '--'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const SPFreeQuota = ({ sps }: SPFreeQuotaProps) => {
<IconFont type={'out'} w={[12, 16]} ml={[2, 8]} />
</Flex>
<Text color="readable.normal" flex={[88, 277]} px={[8, 16]} py={[8, 12]}>
{!item.freeMonthlyQuota ? '--' : formatBytes(item.freeMonthlyQuota)}
{!item.monthlyFreeQuota ? '--' : formatBytes(item.monthlyFreeQuota)}
</Text>
<Text color="readable.normal" flex={[88, 277]} px={[8, 16]} py={[8, 12]}>
{!item.freeQuota ? '--' : formatBytes(item.freeQuota)}
Expand Down
4 changes: 2 additions & 2 deletions apps/dcellar-web-ui/src/modules/pricing-calculator/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
export type TQuotaSP = {
name: string;
freeQuota: string;
freeMonthlyQuota: string;
monthlyFreeQuota: string;
operatorAddress: string;
};
const DEFAULT_GAS_FEE = '0.000006';
Expand Down Expand Up @@ -86,7 +86,7 @@ export const PriceCalculator = () => {
operatorAddress: item.operatorAddress,
name: item?.description?.moniker,
freeQuota: String(keySpMeta[item.operatorAddress]?.FreeReadQuota || ''),
freeMonthlyQuota: String(keySpMeta[item.operatorAddress]?.FreeMonthlyQuota || ''),
monthlyFreeQuota: String(keySpMeta[item.operatorAddress]?.MonthlyFreeQuota || ''),
};
});
setSps(fullSps);
Expand Down
3 changes: 1 addition & 2 deletions apps/dcellar-web-ui/src/store/slices/sp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ export type SpRecommendMeta = {
Description: string;
Endpoint: string;
FreeReadQuota: number;
// todo add monthly quota
FreeMonthlyQuota: number;
MonthlyFreeQuota: number;
Latency: number;
ReadPrice: string;
SPAddress: string;
Expand Down

0 comments on commit 7ffc3cc

Please sign in to comment.