Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

refactor: tidy-up codebase #852

Merged
merged 5 commits into from
Jul 5, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
265 changes: 0 additions & 265 deletions packages/asset-service/src/service/AssetServiceTestData.ts

This file was deleted.

10 changes: 7 additions & 3 deletions packages/chain-adapters/src/evm/EVMBaseAdapter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { AssetId, ChainId, toAssetId } from '@shapeshiftoss/caip'
import { ETHSignMessage } from '@shapeshiftoss/hdwallet-core'
import { bip32ToAddressNList, ETHSignTx, ETHWallet } from '@shapeshiftoss/hdwallet-core'
import {
bip32ToAddressNList,
ETHSignMessage,
ETHSignTx,
ETHWallet
} from '@shapeshiftoss/hdwallet-core'
import { BIP44Params, KnownChainIds } from '@shapeshiftoss/types'
import * as unchained from '@shapeshiftoss/unchained-client'
import WAValidator from 'multicoin-address-validator'
Expand Down Expand Up @@ -63,7 +67,7 @@ export abstract class EVMBaseAdapter<T extends EVMChainIds> implements IChainAda

static defaultBIP44Params: BIP44Params

constructor(args: EVMBaseAdapterArgs) {
protected constructor(args: EVMBaseAdapterArgs) {
EVMBaseAdapter.defaultBIP44Params = (<typeof EVMBaseAdapter>this.constructor).defaultBIP44Params

this.supportedChainIds = args.supportedChainIds
Expand Down
12 changes: 0 additions & 12 deletions packages/investor-foxy/src/api/foxy-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ export type TxInput = {

export type TxInputWithoutAmount = Pick<TxInput, Exclude<keyof TxInput, 'amountDesired'>>

export type TxInputWithoutAmountUnsigned = Pick<
TxInputWithoutAmount,
Exclude<keyof TxInputWithoutAmount, 'wallet' | 'dryRun'>
>

export type TxInputWithoutAmountAndWallet = Pick<
TxInputWithoutAmount,
Exclude<keyof TxInputWithoutAmount, 'wallet'>
Expand Down Expand Up @@ -141,13 +136,6 @@ export type Recipient = {
amount: string
}

export type EstimateClaimFromTokemak = TxInputWithoutAmountAndWallet & {
recipient: Recipient
v: number
r: string
s: string
}

export type RebaseEvent = {
epoch: string
blockNumber: number
Expand Down
4 changes: 0 additions & 4 deletions packages/investor-foxy/src/constants/enums.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
export enum DefiProvider {
Foxy = 'foxy'
}

export enum DefiType {
TokenStaking = 'token-staking'
}
2 changes: 0 additions & 2 deletions packages/market-service/src/coingecko/coingecko-types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export type CoinGeckoMarketCapNoId = Omit<CoinGeckoMarketCap, 'id'>

export type CoinGeckoMarketData = {
current_price: Record<string, number>
market_cap: Record<string, number>
Expand Down
2 changes: 0 additions & 2 deletions packages/market-service/src/fiat-market-service-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export const findByFiatSymbol = async ({ symbol }: FiatMarketDataArgs) => {
result = await FiatMarketProviders[i].findByFiatSymbol({ symbol })
} catch (e) {
// Swallow error, not every fiat will be with every provider.
continue
}
}
if (!result) return null
Expand All @@ -33,7 +32,6 @@ export const findPriceHistoryByFiatSymbol: FiatPriceHistoryType = async ({
result = await FiatMarketProviders[i].findPriceHistoryByFiatSymbol({ symbol, timeframe })
} catch (e) {
// Swallow error, not every fiat will be with every provider.
continue
}
}
if (!result) return []
Expand Down
4 changes: 1 addition & 3 deletions packages/market-service/src/market-service-manager.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { JsonRpcProvider } from '@ethersproject/providers'
import {
FindAllMarketArgs,
HistoryData,
MarketCapResult,
MarketData,
MarketDataArgs,
PriceHistoryArgs
} from '@shapeshiftoss/types'
import { FindAllMarketArgs } from '@shapeshiftoss/types'
import { Yearn } from '@yfi/sdk'

import { MarketService } from './api'
Expand Down Expand Up @@ -79,7 +79,6 @@ export class MarketServiceManager {
result = await this.marketProviders[i].findByAssetId({ assetId })
} catch (e) {
// Swallow error, not every asset will be with every provider.
continue
}
}
if (!result) return null
Expand All @@ -97,7 +96,6 @@ export class MarketServiceManager {
result = await this.marketProviders[i].findPriceHistoryByAssetId({ assetId, timeframe })
} catch (e) {
// Swallow error, not every asset will be with every provider.
continue
}
}
if (!result) return []
Expand Down
Loading