Remove Simplex Promo EU restriction (#1993)

* Remove Simplex Promo EU restriction

* Rerun CI
This commit is contained in:
James Prado 2018-07-03 06:48:31 +01:00 committed by Daniel Ternyak
parent 503beabd62
commit da32d438b8
2 changed files with 2 additions and 13 deletions

View File

@ -13,17 +13,7 @@ const CarouselAnimation = ({ children, ...props }: any) => (
); );
// Don't change Coinbase index // Don't change Coinbase index
const promos = [HardwareWallets, Coinbase, Shapeshift]; const promos = [HardwareWallets, Coinbase, Shapeshift, Simplex];
const isEuroLocal = () => {
// getTimezoneOffset returns the difference in minutes between UTC and local time.
// the offset is positive if behind UTC (like UTC-4), and negative if above (like UTC+2)
const offset = new Date().getTimezoneOffset();
// -240 to 0 covers UTC+4 to UTC+0, which is all of europe
return -240 <= offset && offset < 0;
};
if (isEuroLocal()) {
promos.push(Simplex);
}
interface State { interface State {
activePromo: number; activePromo: number;
@ -35,7 +25,6 @@ interface StateProps {
class PromosClass extends React.PureComponent<StateProps, State> { class PromosClass extends React.PureComponent<StateProps, State> {
public timer: any = null; public timer: any = null;
public state = { public state = {
activePromo: parseInt(String(Math.random() * promos.length), 10) activePromo: parseInt(String(Math.random() * promos.length), 10)
}; };

View File

@ -643,7 +643,7 @@
"SHAPESHIFT_PROMO_2": "& Tokens", "SHAPESHIFT_PROMO_2": "& Tokens",
"COINBASE_PROMO_SMALL": "Its now easier to get more ETH", "COINBASE_PROMO_SMALL": "Its now easier to get more ETH",
"COINBASE_PROMO": "Buy ETH with USD", "COINBASE_PROMO": "Buy ETH with USD",
"SIMPLEX_PROMO": "Buy ETH with EUR", "SIMPLEX_PROMO": "Buy ETH with Credit Card",
"TESTNET": "Testnet", "TESTNET": "Testnet",
"ENCLAVE_LEDGER_FAIL": "Failed to connect to Ledger", "ENCLAVE_LEDGER_FAIL": "Failed to connect to Ledger",
"ENCLAVE_LEDGER_IN_USE": "Your Ledger is currently in use with another application. Please wait, or close other wallet applications before trying again.", "ENCLAVE_LEDGER_IN_USE": "Your Ledger is currently in use with another application. Please wait, or close other wallet applications before trying again.",