-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 = { |
There was a problem hiding this comment.
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 => |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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 => |
There was a problem hiding this comment.
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 => |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as previous comments
No description provided.