Skip to content

Commit

Permalink
Remove tons of unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
karlfloersch committed Sep 2, 2019
1 parent dcf12d7 commit 5789165
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 66 deletions.
10 changes: 6 additions & 4 deletions packages/ovm-engine/src/mock-rollup-aggregator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
State,
MockRollupStateMachine,
Balances,
TransactionReceipt,
UNISWAP_ADDRESS,
UNI_TOKEN_TYPE,
PIGI_TOKEN_TYPE,
Expand Down Expand Up @@ -39,15 +40,16 @@ export class MockAggregator extends SimpleServer {
const rollupStateMachine = new MockRollupStateMachine(genesisState)
const methods = {
// Get the balance for some account
getBalances: (account: Address) =>
getBalances: (account: Address): Balances =>
rollupStateMachine.getBalances(account),
// Get the balance for Uniswap
getUniswapBalances: () => rollupStateMachine.getUniswapBalances(),
getUniswapBalances: (): Balances =>
rollupStateMachine.getUniswapBalances(),
// Apply a transaction
applyTransaction: (transaction: SignedTransaction) =>
applyTransaction: (transaction: SignedTransaction): TransactionReceipt =>
rollupStateMachine.applyTransaction(transaction),
// Request faucet funds
requestFaucetFunds: (params: [Address, number]) => {
requestFaucetFunds: (params: [Address, number]): Balances => {
const [recipient, amount] = params
// Generate the faucet txs (one sending uni the other pigi)
const faucetTxs = generateFaucetTxs(recipient, amount)
Expand Down
8 changes: 1 addition & 7 deletions packages/ovm-engine/src/mock-rollup-client.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
/* External Imports */
import { KeyValueStore, Wallet, RpcClient, serializeObject } from '@pigi/core'
import { KeyValueStore, RpcClient, serializeObject } from '@pigi/core'

/* Internal Imports */
import {
Address,
Balances,
Swap,
isSwapTransaction,
Transfer,
isTransferTransaction,
Storage,
Transaction,
MockedSignature,
SignedTransaction,
TransactionReceipt,
UNISWAP_ADDRESS,
} from '.'
Expand Down
2 changes: 0 additions & 2 deletions packages/ovm-engine/src/mock-rollup-state-machine.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* External Imports */
import { abi, KeyValueStore, Wallet, RpcClient } from '@pigi/core'

/* Internal Imports */
import {
Expand All @@ -9,7 +8,6 @@ import {
isSwapTransaction,
Transfer,
isTransferTransaction,
Storage,
Transaction,
MockedSignature,
SignedTransaction,
Expand Down
23 changes: 2 additions & 21 deletions packages/ovm-engine/src/unipig-wallet.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
/* External Imports */
import {
DefaultWallet,
DefaultWalletDB,
BaseDB,
WalletDB,
BigNumber,
abi,
serializeObject,
deserializeObject,
} from '@pigi/core'
import MemDown from 'memdown'
import { DefaultWallet, DefaultWalletDB, BaseDB, WalletDB } from '@pigi/core'

/* Internal Imports */
import {
Address,
Balances,
Swap,
Transfer,
Transaction,
SignatureProvider,
TransactionReceipt,
MockRollupClient,
} from '.'
import { Address, Balances, TransactionReceipt, MockRollupClient } from '.'

const KEYSTORE_BUCKET = 0
const ROLLUP_BUCKET = 1
Expand Down
11 changes: 1 addition & 10 deletions packages/ovm-engine/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
import {
Address,
SignedTransaction,
State,
MockRollupStateMachine,
Balances,
UNISWAP_ADDRESS,
TokenType,
Transaction,
} from '.'
import { Address, TokenType, Transaction } from '.'

/* Utilities */
export const generateTransferTx = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import './setup'
/* External Imports */
import { SimpleClient, BaseDB } from '@pigi/core'
import MemDown from 'memdown'
import * as assert from 'assert'

/* Internal Imports */
import {
Expand Down
4 changes: 0 additions & 4 deletions packages/ovm-engine/test/mock-aggregator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@ import './setup'

/* External Imports */
import { SimpleClient } from '@pigi/core'
import MemDown from 'memdown'
import * as assert from 'assert'

/* Internal Imports */
import {
UnipigWallet,
Address,
UNISWAP_ADDRESS,
UNI_TOKEN_TYPE,
AGGREGATOR_ADDRESS,
Expand Down
1 change: 0 additions & 1 deletion packages/ovm-engine/test/rollup-state-machine.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import './setup'

/* Internal Imports */
import {
UnipigWallet,
UNI_TOKEN_TYPE,
Address,
MockRollupStateMachine,
Expand Down
17 changes: 1 addition & 16 deletions packages/ovm-engine/test/unipig-wallet.spec.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,8 @@
import './setup'

/* External Imports */
import {
ONE,
OwnershipBody,
Range,
StateObject,
StateUpdate,
Transaction,
stateObjectsEqual,
BigNumber,
DefaultWallet,
DefaultWalletDB,
BaseDB,
SimpleServer,
SimpleClient,
} from '@pigi/core'
import { BaseDB, SimpleServer, SimpleClient } from '@pigi/core'
import MemDown from 'memdown'
import * as assert from 'assert'

/* Internal Imports */
import { UnipigWallet, Address, SignedTransaction } from '../src'
Expand Down

0 comments on commit 5789165

Please sign in to comment.