mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-12 12:04:21 +00:00
Remove unused getAddresses
This commit is contained in:
parent
5aa41d9932
commit
f4b367873c
@ -1,8 +1,6 @@
|
|||||||
import { makeRequest } from './requests';
|
import { makeRequest } from './requests';
|
||||||
import {
|
import {
|
||||||
EnclaveMethods,
|
EnclaveMethods,
|
||||||
GetAddressesParams,
|
|
||||||
GetAddressesResponse,
|
|
||||||
GetChainCodeParams,
|
GetChainCodeParams,
|
||||||
GetChainCodeResponse,
|
GetChainCodeResponse,
|
||||||
SignTransactionParams,
|
SignTransactionParams,
|
||||||
@ -14,10 +12,6 @@ import {
|
|||||||
} from 'shared/enclave/types';
|
} from 'shared/enclave/types';
|
||||||
|
|
||||||
const api = {
|
const api = {
|
||||||
getAddresses(params: GetAddressesParams) {
|
|
||||||
return makeRequest<GetAddressesResponse>(EnclaveMethods.GET_ADDRESSES, params);
|
|
||||||
},
|
|
||||||
|
|
||||||
getChainCode(params: GetChainCodeParams) {
|
getChainCode(params: GetChainCodeParams) {
|
||||||
return makeRequest<GetChainCodeResponse>(EnclaveMethods.GET_CHAIN_CODE, params);
|
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 getChainCode from './getChainCode';
|
||||||
import signTransaction from './signTransaction';
|
import signTransaction from './signTransaction';
|
||||||
import signMessage from './signMessage';
|
import signMessage from './signMessage';
|
||||||
@ -10,7 +9,6 @@ const handlers: {
|
|||||||
params: EnclaveMethodParams
|
params: EnclaveMethodParams
|
||||||
) => EnclaveMethodResponse | Promise<EnclaveMethodResponse>
|
) => EnclaveMethodResponse | Promise<EnclaveMethodResponse>
|
||||||
} = {
|
} = {
|
||||||
[EnclaveMethods.GET_ADDRESSES]: getAddresses,
|
|
||||||
[EnclaveMethods.GET_CHAIN_CODE]: getChainCode,
|
[EnclaveMethods.GET_CHAIN_CODE]: getChainCode,
|
||||||
[EnclaveMethods.SIGN_TRANSACTION]: signTransaction,
|
[EnclaveMethods.SIGN_TRANSACTION]: signTransaction,
|
||||||
[EnclaveMethods.SIGN_MESSAGE]: signMessage,
|
[EnclaveMethods.SIGN_MESSAGE]: signMessage,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
// Enclave enums
|
// Enclave enums
|
||||||
export enum EnclaveMethods {
|
export enum EnclaveMethods {
|
||||||
GET_ADDRESSES = 'get-addresses',
|
|
||||||
GET_CHAIN_CODE = 'get-chain-code',
|
GET_CHAIN_CODE = 'get-chain-code',
|
||||||
SIGN_TRANSACTION = 'sign-transaction',
|
SIGN_TRANSACTION = 'sign-transaction',
|
||||||
SIGN_MESSAGE = 'sign-message',
|
SIGN_MESSAGE = 'sign-message',
|
||||||
@ -23,15 +22,6 @@ export interface RawTransaction {
|
|||||||
value: string;
|
value: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get Addresses Request
|
|
||||||
export interface GetAddressesParams {
|
|
||||||
walletType: WalletTypes;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GetAddressesResponse {
|
|
||||||
addresses: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get chain code request
|
// Get chain code request
|
||||||
export interface GetChainCodeParams {
|
export interface GetChainCodeParams {
|
||||||
walletType: WalletTypes;
|
walletType: WalletTypes;
|
||||||
@ -77,13 +67,11 @@ export interface DisplayAddressResponse {
|
|||||||
|
|
||||||
// All Requests & Responses
|
// All Requests & Responses
|
||||||
export type EnclaveMethodParams =
|
export type EnclaveMethodParams =
|
||||||
| GetAddressesParams
|
|
||||||
| GetChainCodeParams
|
| GetChainCodeParams
|
||||||
| SignTransactionParams
|
| SignTransactionParams
|
||||||
| SignMessageParams
|
| SignMessageParams
|
||||||
| DisplayAddressParams;
|
| DisplayAddressParams;
|
||||||
export type EnclaveMethodResponse =
|
export type EnclaveMethodResponse =
|
||||||
| GetAddressesResponse
|
|
||||||
| GetChainCodeResponse
|
| GetChainCodeResponse
|
||||||
| SignTransactionResponse
|
| SignTransactionResponse
|
||||||
| SignMessageResponse
|
| SignMessageResponse
|
||||||
|
Loading…
x
Reference in New Issue
Block a user