Skip to content

Commit

Permalink
chore: fully remove savings (#5344)
Browse files Browse the repository at this point in the history
* chore: fully remove savings

* missed a spot
  • Loading branch information
skylarbarrera committed Jan 26, 2024
1 parent 0af94fc commit 48fbbf3
Show file tree
Hide file tree
Showing 24 changed files with 9 additions and 680 deletions.
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

0 comments on commit 48fbbf3

Please sign in to comment.