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

chore: fully remove savings #5344

Merged
merged 2 commits into from
Jan 26, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 0 additions & 11 deletions src/apollo/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,6 @@ const defaultOptions = {
},
};

/**
* @deprecated Use the `@/graphql` module for new GraphQL queries.
* @link https://github.com/rainbow-me/rainbow/blob/develop/src/graphql/README.md
* */
export const compoundClientDeprecated = new ApolloClient({
cache: new InMemoryCache(),
link: new HttpLink({
uri: 'https://api.thegraph.com/subgraphs/name/graphprotocol/compound-v2',
}),
});

export class ApolloClientWithTimeout extends ApolloClient<any> {
queryWithTimeout<T = any, TVariables = OperationVariables>(
options: QueryOptions<TVariables, T>,
Expand Down
28 changes: 0 additions & 28 deletions src/apollo/queries.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,5 @@
import gql from 'graphql-tag';

export const COMPOUND_ACCOUNT_AND_MARKET_QUERY = gql`
query account($id: ID!) {
markets {
exchangeRate
id
name
supplyRate
symbol
underlyingAddress
underlyingName
underlyingSymbol
underlyingDecimals
underlyingPrice
}
account(id: $id) {
id
tokens(where: { cTokenBalance_gt: 0 }) {
cTokenBalance
id
lifetimeSupplyInterestAccrued
supplyBalanceUnderlying
symbol
totalUnderlyingSupplied
}
}
}
`;

export const CONTRACT_FUNCTION = gql`
query contractFunction($chainID: Int!, $hex: String!) {
contractFunction(chainID: $chainID, hex: $hex) {
Expand Down
139 changes: 0 additions & 139 deletions src/components/coin-row/SendSavingsCoinRow.js

This file was deleted.

1 change: 0 additions & 1 deletion src/components/coin-row/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ export { default as CollectiblesSendRow } from './CollectiblesSendRow';
export { default as ListCoinRow } from './ListCoinRow';
export { default as RequestCoinRow } from './RequestCoinRow';
export { default as SendCoinRow } from './SendCoinRow';
export { default as SendSavingsCoinRow } from './SendSavingsCoinRow';
export { default as FastTransactionCoinRow } from './FastTransactionCoinRow';
export { default as UnderlyingAssetCoinRow } from './UnderlyingAssetCoinRow';
8 changes: 1 addition & 7 deletions src/components/send/SendAssetForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { KeyboardArea } from 'react-native-keyboard-area';
import { ButtonPressAnimation } from '../animations';
import { SendCoinRow } from '../coin-row';
import CollectiblesSendRow from '../coin-row/CollectiblesSendRow';
import SendSavingsCoinRow from '../coin-row/SendSavingsCoinRow';
import { Column } from '../layout';
import { Text } from '../text';
import SendAssetFormCollectible from './SendAssetFormCollectible';
Expand Down Expand Up @@ -68,13 +67,8 @@ export default function SendAssetForm({
const [showNativeValue, setShowNativeValue] = useState(true);

const isNft = selected.type === AssetTypes.nft;
const isSavings = selected.type === AssetTypes.compound;

const AssetRowElement = isNft
? CollectiblesSendRow
: isSavings
? SendSavingsCoinRow
: SendCoinRow;
const AssetRowElement = isNft ? CollectiblesSendRow : SendCoinRow;

const onFocusAssetInput = useCallback(() => {
setLastFocusedInputHandle(assetInputRef);
Expand Down