mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-12 03:54:13 +00:00
Remove unused getAddresses
This commit is contained in:
parent
5aa41d9932
commit
f4b367873c
@ -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);
|
||||
},
|
||||
|
@ -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']
|
||||
};
|
||||
}
|
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user