Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Conversation

@valentinewallace
Copy link
Contributor

Closes #255

@valentinewallace valentinewallace requested a review from tanx July 3, 2018 20:49
Copy link
Contributor

@tanx tanx left a comment

Choose a reason for hiding this comment

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

Looks great! I added some minor style adjustments and made a few comments

src/store.js Outdated
walletUnlocked: false, // Is the wallet unlocked
lndReady: false, // Is lnd process running
syncedToChain: false, // Is lnd synced to blockchain
percentSynced: 0, // Expects 0-100 range
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if it wouldn't be easier to use a float here between 0 and 1. generateArc divides it by 100 anyway:

const generateArc = (percentage, radius) => {
if (percentage === 0) {
percentage = 1;
} else if (percentage === 100) {
percentage = 99.999;
}
const a = percentage * 2 * Math.PI / 100; // angle (in radian) depends on percentage

LoadNetworkSpinner.propTypes = {
percentage: PropTypes.number.isRequired,
msg: PropTypes.string.isRequired,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Why move the component out of the component library? Seems to me it just makes things more complicated if we decide to reuse the spinner somewhere else.

Copy link
Contributor

@tanx tanx left a comment

Choose a reason for hiding this comment

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

Awesome! Just made a few minor changes.

@tanx tanx merged commit 450f1b0 into master Jul 9, 2018
@tanx tanx deleted the loader-syncing branch July 9, 2018 09:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants