Skip to content

Commit

Permalink
Merge branch 'master' into subgraph-beanstalk2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
soilking committed Aug 15, 2024
2 parents bd197a8 + 7fb9736 commit 94e2c36
Show file tree
Hide file tree
Showing 48 changed files with 5,051 additions and 1,419 deletions.
2 changes: 1 addition & 1 deletion projects/sdk/src/constants/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const addresses = {
DEPOT: Address.make("0xDEb0f00071497a5cc9b4A6B96068277e57A82Ae2"),
PIPELINE: Address.make("0xb1bE0000C6B3C62749b5F0c92480146452D15423"),
ROOT: Address.make("0x77700005BEA4DE0A78b956517f099260C2CA9a26"),
USD_ORACLE: Address.make("0xE0AdBED7e2ac72bc7798c5DC33aFD77B068db7Fd"),
USD_ORACLE: Address.make("0xb24a70b71e4cca41eb114c2f61346982aa774180"),
UNWRAP_AND_SEND_ETH_JUNCTION: Address.make("0x737Cad465B75CDc4c11B3E312Eb3fe5bEF793d96"),

// ----------------------------------------
Expand Down
15 changes: 12 additions & 3 deletions projects/ui/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ module.exports = {
'no-trailing-spaces': 0,

// -- Emotion css prop on DOM element override - https://emotion.sh/docs/eslint-plugin-react
"react/no-unknown-property": ["error", { "ignore": ["css"] }],
'react/no-unknown-property': ['error', { ignore: ['css'] }],

// -- Other (to categorize)
'react/button-has-type': 0,
Expand All @@ -101,8 +101,17 @@ module.exports = {
'no-continue': 0,
'import/extensions': 0,
'newline-per-chained-call': 0,
'no-use-before-define': 0,
'@typescript-eslint/no-use-before-define': 'error',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': [
'error',
{
functions: false,
classes: true,
variables: true,
typedefs: true,
allowNamedExports: true,
},
],
'import/prefer-default-export': 0,
'react/jsx-props-no-spreading': 0,
'jsx-a11y/label-has-associated-control': 0,
Expand Down
7 changes: 7 additions & 0 deletions projects/ui/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
./src/generated
./src/graph/graphql.schema.json
./src/graph/schema-bean.graphql
./src/graph/schema-beanft.graphql
./src/graph/schema-beanstalk.graphql
./src/graph/schema-snapshot1.graphql
./src/graph/schema-snapshot2.graphql
21 changes: 13 additions & 8 deletions projects/ui/src/components/Analytics/AdvancedChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ import SelectDialog from './SelectDialog';
import { useChartSetupData } from './useChartSetupData';
import CalendarButton from './CalendarButton';

type QueryData = {
time: Time,
value: number,
export type ChartQueryData = {
time: Time;
value: number;
customValues: {
season: number
season: number;
};
};

type QueryData = ChartQueryData;

const AdvancedChart: FC<{ isMobile?: boolean }> = ({ isMobile = false }) => {
const season = useSeason();
const chartSetupData = useChartSetupData();
Expand Down Expand Up @@ -92,17 +94,20 @@ const AdvancedChart: FC<{ isMobile?: boolean }> = ({ isMobile = false }) => {
&& timestamps.get(seasonData.season - 1) !== timestamps.get(seasonData.season)
) {
const formattedTime = timestamps.get(seasonData.season);
const dataFormatter = chartSetupData[chartId].dataFormatter;
const _seasonData = dataFormatter ? dataFormatter(seasonData) : seasonData;

const formattedValue = chartSetupData[
chartId
].valueFormatter(
seasonData[chartSetupData[chartId].priceScaleKey]
_seasonData[chartSetupData[chartId].priceScaleKey]
);
if (formattedTime > 0) {
output[chartId][seasonData.season] = {
time: formattedTime,
output[chartId][_seasonData.season] = {
time: formattedTime,
value: formattedValue,
customValues: {
season: seasonData.season
season: _seasonData.season
}
};
};
Expand Down
Loading

0 comments on commit 94e2c36

Please sign in to comment.