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

Add decent wallet #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add decent wallet #20

wants to merge 2 commits into from

Conversation

7flash
Copy link
Collaborator

@7flash 7flash commented Nov 17, 2018

No description provided.

Copy link
Collaborator

@Clement-Bresson Clement-Bresson left a comment

Choose a reason for hiding this comment

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

Main objection for this PR is we need to keep QTUM components.
For me, best is to create "Base" components for Achievements and Wallets.
But then having different usage of them for QTUM/DECENT....other blockchains.

])(state),
currentAchievement: S.achievement.currentFrom(achievementsChain),
pastAchievements: S.achievement.pastFrom(achievementsChain),
userID: S.facebook.login.userID(state),
walletAddress: S.wallets.qtum.address(state),
walletBalance: S.wallets.qtum.balance(state)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We need to still keep code for QTUM.
I think if Achivements are specifice for each blockchain, we need to create Achivements components inside a WALLET directory.

For ex:

Qtum/
    Achievements/
    Wallet/
Decent/
   Achievements/
   Wallet/

onDeposit={this.handleDeposit}
walletBalance={walletBalance}
title={title}
/>
</CardActions>
) : (
<CardActions
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as previous comment, we cant just remove this parts if we want to still support Qtum

])(state),
createAchievementStatus: S.achievement.createStatus(state),
fetchStatus: S.achievements.fetchStatus(state),
lastLinkOfUserAchievementOrNull: S.achievements.lastLinkOfUserAchievementOrNull(userQtumAddress)(state)
lastLinkOfUserAchievementOrNull: S.achievements.lastLinkOfUserAchievementOrNull(userDecentAddress)(state)
})

const mapDispatchToProps = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as previous comments

address: S.wallets.decent.address(state),
balance: S.wallets.decent.balance(state),
hasPendingTx: S.wallets.decent.hasPendingTx(state),
unconfirmedBalance: S.wallets.decent.unconfirmedBalance(state)
})

export default WrappedComponent =>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as previous comments

</Hidden>
</List>
)
}

WalletDisplay.propTypes = {
address: T.string,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as previous comments

})

const mapDispatchToProps = (dispatch) => bindActionCreators({
infoSaved: A.wallets.qtum.infoSaved
infoSaved: A.wallets.decent.infoSaved
}, dispatch)

export default WrappedComponent =>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as previous comments

userID: S.facebook.login.userID(state),
walletStatus: S.wallets.qtum.status(state)
walletStatus: S.wallets.decent.status(state)
})

export default WrappedComponent =>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as previous comments

@@ -46,7 +46,7 @@ const confirm = function * (payload) {
const support = function * ({ amount, fees, link }) {
try {
const { data: { address, encodedData } } = yield call(api.encodeSupport, { link })
const walletUtil = yield select(selectors.wallets.qtum.util)
const walletUtil = yield select(selectors.wallets.decent.util)
const rawTx = yield call([walletUtil, 'generateContractSendTx'], address, encodedData, {
amount: amount * 1e8,
feeRate: fees
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as previous comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants