diff --git a/shared/enclave/client/index.ts b/shared/enclave/client/index.ts index 6381a8fa..f4ea8494 100644 --- a/shared/enclave/client/index.ts +++ b/shared/enclave/client/index.ts @@ -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(EnclaveMethods.GET_ADDRESSES, params); - }, - getChainCode(params: GetChainCodeParams) { return makeRequest(EnclaveMethods.GET_CHAIN_CODE, params); }, diff --git a/shared/enclave/server/handlers/getAddresses.ts b/shared/enclave/server/handlers/getAddresses.ts deleted file mode 100644 index 787baff6..00000000 --- a/shared/enclave/server/handlers/getAddresses.ts +++ /dev/null @@ -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'] - }; -} diff --git a/shared/enclave/server/handlers/index.ts b/shared/enclave/server/handlers/index.ts index af7068d2..34277189 100644 --- a/shared/enclave/server/handlers/index.ts +++ b/shared/enclave/server/handlers/index.ts @@ -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 } = { - [EnclaveMethods.GET_ADDRESSES]: getAddresses, [EnclaveMethods.GET_CHAIN_CODE]: getChainCode, [EnclaveMethods.SIGN_TRANSACTION]: signTransaction, [EnclaveMethods.SIGN_MESSAGE]: signMessage, diff --git a/shared/enclave/types.ts b/shared/enclave/types.ts index 11af7b4d..8d2859ca 100644 --- a/shared/enclave/types.ts +++ b/shared/enclave/types.ts @@ -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