Skip to content

Commit

Permalink
Merge pull request #149 from Emurgo/feature/importYoroiWallet
Browse files Browse the repository at this point in the history
Reusable Transfer Screen
  • Loading branch information
nicarq committed Dec 18, 2018
2 parents 811f95f + a101769 commit 4f38603
Show file tree
Hide file tree
Showing 31 changed files with 620 additions and 585 deletions.
2 changes: 1 addition & 1 deletion app/Routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const Wallet = resolver('containers/wallet/Wallet');
const WalletSummaryPage = resolver('containers/wallet/WalletSummaryPage');
const WalletSendPage = resolver('containers/wallet/WalletSendPage');
const WalletReceivePage = resolver('containers/wallet/WalletReceivePage');
const DaedalusTransferPage = resolver('containers/daedalusTransfer/DaedalusTransferPage');
const DaedalusTransferPage = resolver('containers/transfer/DaedalusTransferPage');

/* eslint-disable max-len */
export const Routes = (
Expand Down
6 changes: 3 additions & 3 deletions app/api/ada/daedalusTransfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import type {
} from './adaTypes';
import type {
TransferTx
} from '../../types/daedalusTransferTypes';
} from '../../types/TransferTypes';

/** Go through the whole UTXO and see which belong to the walet and have non-empty balance
* @param fullUtxo the full utxo of the Cardano blockchain
Expand Down Expand Up @@ -75,7 +75,7 @@ export async function generateTransferTx(payload: {
const recoveredBalance = await getBalance(senders);
const inputs = _getInputs(senderUtxos, addressesWithFunds);

// pick which address to send migration to
// pick which address to send transfer to
const output = await _getReceiverAddress();

// get wallet and make transaction
Expand All @@ -99,7 +99,7 @@ export async function generateTransferTx(payload: {
}
}

/** Follow heuristic to pick which address to send Daedalus migration to */
/** Follow heuristic to pick which address to send Daedalus transfer to */
async function _getReceiverAddress(): Promise<string> {
// Note: Current heuristic is to pick the first address in the wallet
// rationale & better heuristic described at https://github.com/Emurgo/yoroi-frontend/issues/96
Expand Down
214 changes: 0 additions & 214 deletions app/components/daedalusTransfer/DaedalusTransferInstructionsPage.js

This file was deleted.

This file was deleted.

39 changes: 39 additions & 0 deletions app/components/transfer/AnnotatedLoader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// @flow
import React, { Component } from 'react';
import { observer } from 'mobx-react';
import LoadingSpinner from '../widgets/LoadingSpinner';
import styles from './AnnotatedLoader.scss';

type Props = {
title: string,
details: string
};

@observer
export default class AnnotatedLoader extends Component<Props> {

render() {
const { title, details } = this.props;

return (
<div className={styles.component}>

<div>
<div className={styles.body}>

<div className={styles.title}>
{title}
</div>

<LoadingSpinner />

<div className={styles.progressInfo}>
{details}
</div>
</div>
</div>

</div>
);
}
}
Loading

0 comments on commit 4f38603

Please sign in to comment.