Skip to content

Commit

Permalink
chore(bridge-ui): remove unnecessary interface (#13322)
Browse files Browse the repository at this point in the history
  • Loading branch information
jscriptcoder authored Mar 15, 2023
1 parent 8b753ee commit 8dcccc0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 31 deletions.
5 changes: 2 additions & 3 deletions packages/bridge-ui/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
import { ethers } from 'ethers';
import type { Prover } from './domain/proof';
import { successToast } from './utils/toast';
import { StorageService } from './storage/service';
import { StorageService } from './storage/StorageService';
import { MessageStatus } from './domain/message';
import BridgeABI from './constants/abi/Bridge';
import { providers } from './store/providers';
import HeaderAnnouncement from './components/HeaderAnnouncement.svelte';
import type { TokenService } from './domain/token';
import { CustomTokenService } from './storage/customTokenService';
import { CustomTokenService } from './storage/CustomTokenService';
import { userTokens, tokenService } from './store/userToken';
import RelayerAPIService from './relayer-api/service';
import type { RelayerAPI } from './domain/relayerApi';
Expand Down Expand Up @@ -146,7 +146,6 @@
const apiTxs = await $relayerApi.GetAllByAddress(userAddress);
const blockInfoMap = await $relayerApi.GetBlockInfo();
relayerBlockInfoMap.set(blockInfoMap);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import type { Token, TokenService } from 'src/domain/token';

interface storage {
getItem(key: string): string;
setItem(key: string, value: string);
}

class CustomTokenService implements TokenService {
private readonly storage: storage;
export class CustomTokenService implements TokenService {
private readonly storage: Storage;

constructor(storage: storage) {
constructor(storage: Storage) {
this.storage = storage;
}

Expand Down Expand Up @@ -57,5 +52,3 @@ class CustomTokenService implements TokenService {
return updatedTokenList;
}
}

export { CustomTokenService };
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import { BigNumber, BigNumberish, ethers } from 'ethers';
import { TKO } from '../domain/token';
import {
CHAIN_ID_MAINNET,
CHAIN_ID_TAIKO,
CHAIN_MAINNET,
CHAIN_TKO,
} from '../domain/chain';
import { CHAIN_ID_MAINNET, CHAIN_ID_TAIKO } from '../domain/chain';
import { MessageStatus } from '../domain/message';
import { StorageService } from './service';
import { StorageService } from './StorageService';
import type { BridgeTransaction } from '../domain/transactions';
const mockStorage = {
getItem: jest.fn(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
import type { BridgeTransaction, Transactioner } from '../domain/transactions';
import { BigNumber, Contract, ethers } from 'ethers';
import Bridge from '../constants/abi/Bridge';
import { chains, CHAIN_MAINNET, CHAIN_TKO } from '../domain/chain';
import { chains } from '../domain/chain';
import TokenVault from '../constants/abi/TokenVault';
import { chainIdToTokenVaultAddress } from '../store/bridge';
import { get } from 'svelte/store';
import ERC20 from '../constants/abi/ERC20';
import { MessageStatus } from '../domain/message';

interface storage {
getItem(key: string): string;
setItem(key: string, value: unknown): void;
}

class StorageService implements Transactioner {
private readonly storage: storage;
export class StorageService implements Transactioner {
private readonly storage: Storage;
private readonly providerMap: Map<number, ethers.providers.JsonRpcProvider>;

constructor(
storage: storage,
storage: Storage,
providerMap: Map<number, ethers.providers.JsonRpcProvider>,
) {
this.storage = storage;
Expand Down Expand Up @@ -154,5 +149,3 @@ class StorageService implements Transactioner {
);
}
}

export { StorageService };

0 comments on commit 8dcccc0

Please sign in to comment.