Remove unused getAddresses

This commit is contained in:
Will O'Beirne 2018-05-04 12:01:38 -04:00
parent 5aa41d9932
commit f4b367873c
No known key found for this signature in database
GPG Key ID: 44C190DB5DEAF9F6
4 changed files with 0 additions and 28 deletions

View File

@ -1,8 +1,6 @@
import { makeRequest } from './requests';
import {
EnclaveMethods,
GetAddressesParams,
GetAddressesResponse,
GetChainCodeParams,
GetChainCodeResponse,
SignTransactionParams,
@ -14,10 +12,6 @@ import {
} from 'shared/enclave/types';
const api = {
getAddresses(params: GetAddressesParams) {
return makeRequest<GetAddressesResponse>(EnclaveMethods.GET_ADDRESSES, params);
},
getChainCode(params: GetChainCodeParams) {
return makeRequest<GetChainCodeResponse>(EnclaveMethods.GET_CHAIN_CODE, params);
},

View File

@ -1,8 +0,0 @@
import { GetAddressesParams, GetAddressesResponse } from 'shared/enclave/types';
export default function(params: GetAddressesParams): GetAddressesResponse {
console.log('getAddresses called with', params);
return {
addresses: ['test1', 'test2', 'test3']
};
}

View File

@ -1,4 +1,3 @@
import getAddresses from './getAddresses';
import getChainCode from './getChainCode';
import signTransaction from './signTransaction';
import signMessage from './signMessage';
@ -10,7 +9,6 @@ const handlers: {
params: EnclaveMethodParams
) => EnclaveMethodResponse | Promise<EnclaveMethodResponse>
} = {
[EnclaveMethods.GET_ADDRESSES]: getAddresses,
[EnclaveMethods.GET_CHAIN_CODE]: getChainCode,
[EnclaveMethods.SIGN_TRANSACTION]: signTransaction,
[EnclaveMethods.SIGN_MESSAGE]: signMessage,

View File

@ -1,6 +1,5 @@
// Enclave enums
export enum EnclaveMethods {
GET_ADDRESSES = 'get-addresses',
GET_CHAIN_CODE = 'get-chain-code',
SIGN_TRANSACTION = 'sign-transaction',
SIGN_MESSAGE = 'sign-message',
@ -23,15 +22,6 @@ export interface RawTransaction {
value: string;
}
// Get Addresses Request
export interface GetAddressesParams {
walletType: WalletTypes;
}
export interface GetAddressesResponse {
addresses: string[];
}
// Get chain code request
export interface GetChainCodeParams {
walletType: WalletTypes;
@ -77,13 +67,11 @@ export interface DisplayAddressResponse {
// All Requests & Responses
export type EnclaveMethodParams =
| GetAddressesParams
| GetChainCodeParams
| SignTransactionParams
| SignMessageParams
| DisplayAddressParams;
export type EnclaveMethodResponse =
| GetAddressesResponse
| GetChainCodeResponse
| SignTransactionResponse
| SignMessageResponse