use test stripe token when connected to api on localhost
This commit is contained in:
parent
010534cc16
commit
1f6b477d24
3 changed files with 9 additions and 7 deletions
|
@ -1,12 +1,8 @@
|
|||
import React from "react";
|
||||
import lbry from "lbry.js";
|
||||
import lbryuri from "lbryuri.js";
|
||||
import Link from "component/link";
|
||||
import FormField from "component/formField";
|
||||
import FileTile from "component/fileTile";
|
||||
import rewards from "rewards.js";
|
||||
import lbryio from "lbryio.js";
|
||||
import { BusyMessage, Thumbnail } from "component/common.js";
|
||||
import { BusyMessage } from "component/common.js";
|
||||
|
||||
class FileList extends React.PureComponent {
|
||||
constructor(props) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from "react";
|
||||
import { CreditAmount } from "component/common";
|
||||
import Link from "component/link";
|
||||
import CardVerify from "component/cardVerify";
|
||||
import lbryio from "lbryio.js";
|
||||
|
||||
class UserVerify extends React.PureComponent {
|
||||
constructor(props) {
|
||||
|
@ -44,7 +44,7 @@ class UserVerify extends React.PureComponent {
|
|||
label={__("Link Card and Finish")}
|
||||
disabled={isPending}
|
||||
token={this.onToken.bind(this)}
|
||||
stripeKey="pk_live_e8M4dRNnCCbmpZzduEUZBgJO"
|
||||
stripeKey={lbryio.getStripeToken()}
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
|
|
|
@ -205,4 +205,10 @@ lbryio.authenticate = function() {
|
|||
return lbryio._authenticationPromise;
|
||||
};
|
||||
|
||||
lbryio.getStripeToken = () => {
|
||||
return CONNECTION_STRING.startsWith("http://localhost:")
|
||||
? "pk_test_NoL1JWL7i1ipfhVId5KfDZgo"
|
||||
: "pk_live_e8M4dRNnCCbmpZzduEUZBgJO";
|
||||
};
|
||||
|
||||
export default lbryio;
|
||||
|
|
Loading…
Reference in a new issue