Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reusable Transfer Screen #149

Merged
merged 3 commits into from
Dec 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

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>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this formatting is a little strange. is it manual?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(the line breaks)

<LoadingSpinner />

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

</div>
);
}
}
Loading