mirror of
https://github.com/trezor/trezor-wallet
synced 2025-02-11 15:42:42 +00:00
remove comments
This commit is contained in:
parent
128d238037
commit
b7790c0351
@ -61,26 +61,3 @@ export const serializeEthereumTx = (tx: EthereumTransaction): PromiseAction<stri
|
|||||||
const ethTx = new EthereumjsTx(tx);
|
const ethTx = new EthereumjsTx(tx);
|
||||||
return `0x${ethTx.serialize().toString('hex')}`;
|
return `0x${ethTx.serialize().toString('hex')}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
// type RippleTxRequest = {
|
|
||||||
// network: string;
|
|
||||||
// from: string;
|
|
||||||
// to: string;
|
|
||||||
// amount: string;
|
|
||||||
// data: string;
|
|
||||||
// gasLimit: string;
|
|
||||||
// gasPrice: string;
|
|
||||||
// nonce: number;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// export const prepareRippleTx = (tx: RippleTxRequest): PromiseAction<RippleTransaction> => async (dispatch: Dispatch): Promise<RippleTransaction> => {
|
|
||||||
// // TODO: fetch account sequence
|
|
||||||
// return {
|
|
||||||
// fee: string,
|
|
||||||
// flags?: number,
|
|
||||||
// sequence?: number,
|
|
||||||
// maxLedgerVersion?: number, // Proto: "last_ledger_sequence"
|
|
||||||
// payment: Payment,
|
|
||||||
// }
|
|
||||||
|
|
||||||
// };
|
|
@ -17,7 +17,6 @@ import * as AccountsActions from 'actions/AccountsActions';
|
|||||||
|
|
||||||
export const discoverAccount = (device: TrezorDevice, address: string, network: string): PromiseAction<EthereumAccount> => async (dispatch: Dispatch): Promise<EthereumAccount> => {
|
export const discoverAccount = (device: TrezorDevice, address: string, network: string): PromiseAction<EthereumAccount> => async (dispatch: Dispatch): Promise<EthereumAccount> => {
|
||||||
// get data from connect
|
// get data from connect
|
||||||
// Temporary disabled, enable after trezor-connect@5.0.32 release
|
|
||||||
const txs = await TrezorConnect.ethereumGetAccountInfo({
|
const txs = await TrezorConnect.ethereumGetAccountInfo({
|
||||||
account: {
|
account: {
|
||||||
address,
|
address,
|
||||||
@ -35,7 +34,6 @@ export const discoverAccount = (device: TrezorDevice, address: string, network:
|
|||||||
|
|
||||||
// blockbook web3 fallback
|
// blockbook web3 fallback
|
||||||
const web3account = await dispatch(Web3Actions.discoverAccount(address, network));
|
const web3account = await dispatch(Web3Actions.discoverAccount(address, network));
|
||||||
// return { transactions: txs.payload, ...web3account };
|
|
||||||
return {
|
return {
|
||||||
address,
|
address,
|
||||||
transactions: txs.payload.transactions,
|
transactions: txs.payload.transactions,
|
||||||
|
@ -36,7 +36,6 @@ export const discoverAccount = (device: TrezorDevice, discoveryProcess: Discover
|
|||||||
const { accountIndex } = discoveryProcess;
|
const { accountIndex } = discoveryProcess;
|
||||||
const path = network.bip44.slice(0).replace('a', accountIndex.toString());
|
const path = network.bip44.slice(0).replace('a', accountIndex.toString());
|
||||||
|
|
||||||
// $FlowIssue npm not released yet
|
|
||||||
const response = await TrezorConnect.rippleGetAccountInfo({
|
const response = await TrezorConnect.rippleGetAccountInfo({
|
||||||
device: {
|
device: {
|
||||||
path: device.path,
|
path: device.path,
|
||||||
|
@ -72,7 +72,7 @@ export const observe = (prevState: ReducersState, action: Action): ThunkAction =
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Called from "observe" action
|
* Called from "observe" action
|
||||||
* Initialize "sendForm" reducer data
|
* Initialize "sendFormRipple" reducer data
|
||||||
* Get data either from session storage or "selectedAccount" reducer
|
* Get data either from session storage or "selectedAccount" reducer
|
||||||
*/
|
*/
|
||||||
export const init = (): AsyncAction => async (dispatch: Dispatch, getState: GetState): Promise<void> => {
|
export const init = (): AsyncAction => async (dispatch: Dispatch, getState: GetState): Promise<void> => {
|
||||||
@ -85,7 +85,6 @@ export const init = (): AsyncAction => async (dispatch: Dispatch, getState: GetS
|
|||||||
|
|
||||||
const stateFromStorage = dispatch(SessionStorageActions.loadRippleDraftTransaction());
|
const stateFromStorage = dispatch(SessionStorageActions.loadRippleDraftTransaction());
|
||||||
if (stateFromStorage) {
|
if (stateFromStorage) {
|
||||||
// TODO: consider if current gasPrice should be set here as "recommendedGasPrice"
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: SEND.INIT,
|
type: SEND.INIT,
|
||||||
networkType: 'ripple',
|
networkType: 'ripple',
|
||||||
|
Loading…
Reference in New Issue
Block a user