mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-15 14:59:48 +00:00
simplify config
This commit is contained in:
parent
85468c350c
commit
edb9ad3f01
1 changed files with 8 additions and 20 deletions
|
@ -314,25 +314,6 @@ class CardVerify extends React.Component {
|
||||||
this.setState({ open: false });
|
this.setState({ open: false });
|
||||||
};
|
};
|
||||||
|
|
||||||
getConfig = () =>
|
|
||||||
["token", "name", "description"].reduce(
|
|
||||||
(config, key) =>
|
|
||||||
Object.assign(
|
|
||||||
{},
|
|
||||||
config,
|
|
||||||
this.props.hasOwnProperty(key) && {
|
|
||||||
[key]: this.props[key],
|
|
||||||
}
|
|
||||||
),
|
|
||||||
{
|
|
||||||
allowRememberMe: false,
|
|
||||||
closed: this.onClosed,
|
|
||||||
description: __("Confirm Identity"),
|
|
||||||
email: this.props.email,
|
|
||||||
panelLabel: "Verify",
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
updateStripeHandler() {
|
updateStripeHandler() {
|
||||||
if (!CardVerify.stripeHandler) {
|
if (!CardVerify.stripeHandler) {
|
||||||
CardVerify.stripeHandler = StripeCheckout.configure({
|
CardVerify.stripeHandler = StripeCheckout.configure({
|
||||||
|
@ -343,7 +324,14 @@ class CardVerify extends React.Component {
|
||||||
|
|
||||||
showStripeDialog() {
|
showStripeDialog() {
|
||||||
this.setState({ open: true });
|
this.setState({ open: true });
|
||||||
CardVerify.stripeHandler.open(this.getConfig());
|
CardVerify.stripeHandler.open({
|
||||||
|
allowRememberMe: false,
|
||||||
|
closed: this.onClosed,
|
||||||
|
description: __("Confirm Identity"),
|
||||||
|
email: this.props.email,
|
||||||
|
panelLabel: "Verify",
|
||||||
|
token: this.props.token,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onClick = () => {
|
onClick = () => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue