Skip to content
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

Exchange rate query acting strange... #20

Open
ponderingdemocritus opened this issue Jan 16, 2023 · 0 comments
Open

Exchange rate query acting strange... #20

ponderingdemocritus opened this issue Jan 16, 2023 · 0 comments

Comments

@ponderingdemocritus
Copy link
Contributor

The generated schema foe:

export type GetExchangeRatesQuery = {
  __typename?: 'Query';
  getExchangeRates: Array<{
    __typename?: 'ExchangeRate24Hr';
    tokenId: number;
    tokenName: string;
    amount: string;
    buyAmount: string;
    sellAmount: string;
    currencyReserve: string;
    tokenReserve: string;
    percentChange24Hr?: number | null;
  }>;
};

If you look at ExchangeRate24Hr

Then you will see it is actually:

export type ExchangeRate24Hr = {
  __typename?: 'ExchangeRate24Hr';
  amount: Scalars['String'];
  buyAmount: Scalars['String'];
  currencyReserve: Scalars['String'];
  date: Scalars['String'];
  hour: Scalars['Int'];
  lpAmount: Scalars['String'];
  percentChange24Hr?: Maybe<Scalars['Float']>;
  sellAmount: Scalars['String'];
  tokenId: Scalars['Int'];
  tokenName: Scalars['String'];
  tokenReserve: Scalars['String'];
};

This means that client-side there is a mismatch in interfaces - right now just have a manual interface in the useMarketRate.tsx but we should be using the generated where possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant