From 193bcfe8f5ca651e3091b48f8217915df74694ad Mon Sep 17 00:00:00 2001 From: bohdan-titan Date: Thu, 16 Jan 2025 01:43:46 +0100 Subject: [PATCH] Removed whitelist codebase --- .github/workflows/auto-publish.yml | 2 - .github/workflows/auto-release-dev.yml | 2 - .github/workflows/auto-release-stg.yml | 2 - package.json | 4 +- public/config/index.js | 3 +- src/components/contracts/SellerHub.js | 14 ----- .../SellerWhitelistModal.js | 59 ------------------- src/store/hocs/withContractsState.js | 1 - src/store/selectors/config.js | 3 - 9 files changed, 3 insertions(+), 87 deletions(-) delete mode 100644 src/components/contracts/modals/SellerWhitelistModal/SellerWhitelistModal.js diff --git a/.github/workflows/auto-publish.yml b/.github/workflows/auto-publish.yml index 0ff5a39e..2b148fb4 100644 --- a/.github/workflows/auto-publish.yml +++ b/.github/workflows/auto-publish.yml @@ -46,7 +46,6 @@ jobs: PORT_CHECK_ERROR_LINK: ${{ vars.PORT_CHECK_ERROR_LINK }} PORT_CHECKER_URL: ${{ vars.PORT_CHECKER_URL }} RECAPTCHA_SITE_KEY: ${{ secrets.RECAPTCHA_SITE_KEY }} - SELLER_WHITELIST_URL: ${{ vars.SELLER_WHITELIST_URL }} SHOW_FAUCET: ${{ vars.SHOW_FAUCET }} SYMBOL_ETH: ${{ vars.SYMBOL_ETH }} SYMBOL_LMR: ${{ vars.SYMBOL_LMR }} @@ -86,7 +85,6 @@ jobs: echo "PROXY_ROUTER_URL=$PROXY_ROUTER_URL" >> .env echo "RECAPTCHA_SITE_KEY=$RECAPTCHA_SITE_KEY" >> .env echo "REQUIRED_PASSWORD_ENTROPY=$REQUIRED_PASSWORD_ENTROPY" >> .env - echo "SELLER_WHITELIST_URL=$SELLER_WHITELIST_URL" >> .env echo "SHOW_FAUCET=$SHOW_FAUCET" >> .env echo "SYMBOL_ETH=$SYMBOL_ETH" >> .env echo "SYMBOL_LMR=$SYMBOL_LMR" >> .env diff --git a/.github/workflows/auto-release-dev.yml b/.github/workflows/auto-release-dev.yml index edb40cd5..9c0ecf2e 100644 --- a/.github/workflows/auto-release-dev.yml +++ b/.github/workflows/auto-release-dev.yml @@ -52,7 +52,6 @@ jobs: PORT_CHECK_ERROR_LINK: ${{ vars.PORT_CHECK_ERROR_LINK }} PORT_CHECKER_URL: ${{ vars.PORT_CHECKER_URL }} RECAPTCHA_SITE_KEY: ${{ secrets.RECAPTCHA_SITE_KEY }} - SELLER_WHITELIST_URL: ${{ vars.SELLER_WHITELIST_URL }} SHOW_FAUCET: ${{ vars.SHOW_FAUCET }} SYMBOL_ETH: ${{ vars.SYMBOL_ETH }} SYMBOL_LMR: ${{ vars.SYMBOL_LMR }} @@ -92,7 +91,6 @@ jobs: echo "PROXY_ROUTER_URL=$PROXY_ROUTER_URL" >> .env echo "RECAPTCHA_SITE_KEY=$RECAPTCHA_SITE_KEY" >> .env echo "REQUIRED_PASSWORD_ENTROPY=$REQUIRED_PASSWORD_ENTROPY" >> .env - echo "SELLER_WHITELIST_URL=$SELLER_WHITELIST_URL" >> .env echo "SHOW_FAUCET=$SHOW_FAUCET" >> .env echo "SYMBOL_ETH=$SYMBOL_ETH" >> .env echo "SYMBOL_LMR=$SYMBOL_LMR" >> .env diff --git a/.github/workflows/auto-release-stg.yml b/.github/workflows/auto-release-stg.yml index 68e2319d..8a755b7e 100644 --- a/.github/workflows/auto-release-stg.yml +++ b/.github/workflows/auto-release-stg.yml @@ -52,7 +52,6 @@ jobs: PORT_CHECK_ERROR_LINK: ${{ vars.PORT_CHECK_ERROR_LINK }} PORT_CHECKER_URL: ${{ vars.PORT_CHECKER_URL }} RECAPTCHA_SITE_KEY: ${{ secrets.RECAPTCHA_SITE_KEY }} - SELLER_WHITELIST_URL: ${{ vars.SELLER_WHITELIST_URL }} SHOW_FAUCET: ${{ vars.SHOW_FAUCET }} SYMBOL_ETH: ${{ vars.SYMBOL_ETH }} SYMBOL_LMR: ${{ vars.SYMBOL_LMR }} @@ -92,7 +91,6 @@ jobs: echo "PROXY_ROUTER_URL=$PROXY_ROUTER_URL" >> .env echo "RECAPTCHA_SITE_KEY=$RECAPTCHA_SITE_KEY" >> .env echo "REQUIRED_PASSWORD_ENTROPY=$REQUIRED_PASSWORD_ENTROPY" >> .env - echo "SELLER_WHITELIST_URL=$SELLER_WHITELIST_URL" >> .env echo "SHOW_FAUCET=$SHOW_FAUCET" >> .env echo "SYMBOL_ETH=$SYMBOL_ETH" >> .env echo "SYMBOL_LMR=$SYMBOL_LMR" >> .env diff --git a/package.json b/package.json index 1b828d7e..293be617 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lumerin-wallet-desktop", - "version": "1.3.4", + "version": "1.3.5", "engines": { "node": ">=14" }, @@ -45,7 +45,7 @@ }, "dependencies": { "@electron/remote": "2.0.9", - "@lumerin/wallet-core": "github:Lumerin-protocol/WalletCore#1.1.1", + "@lumerin/wallet-core": "github:Lumerin-protocol/WalletCore#1.1.2", "@reach/menu-button": "0.17.0", "@tabler/icons": "1.119.0", "axios": "0.27.2", diff --git a/public/config/index.js b/public/config/index.js index 5a122b3e..e8968dc8 100644 --- a/public/config/index.js +++ b/public/config/index.js @@ -56,8 +56,7 @@ const chain = { titanLightningDashboard: process.env.TITAN_LIGHTNING_DASHBOARD || "https://lightning.titan.io", defaultSellerCurrency: process.env.DEFAULT_SELLER_CURRENCY || 'BTC', - bypassAuth: process.env.BYPASS_AUTH === "true", - sellerWhitelistUrl: process.env.SELLER_WHITELIST_URL || 'https://forms.gle/wEcAgppfK2p9YZ3g7' + bypassAuth: process.env.BYPASS_AUTH === "true" }; module.exports = { diff --git a/src/components/contracts/SellerHub.js b/src/components/contracts/SellerHub.js index 54e94814..751069ae 100644 --- a/src/components/contracts/SellerHub.js +++ b/src/components/contracts/SellerHub.js @@ -14,7 +14,6 @@ import { lmrDecimals } from '../../utils/coinValue'; import { formatBtcPerTh, calculateSuggestedPrice } from './utils'; import ArchiveModal from './modals/ArchiveModal/ArchiveModal'; import { IconArchive } from '@tabler/icons'; -import SellerWhitelistModal from './modals/SellerWhitelistModal/SellerWhitelistModal'; import AdjustProfitModal from './modals/AdjustProfitModal/AdjustProfitModal'; const Container = styled.div` @@ -88,7 +87,6 @@ function SellerHub({ }) { const [isModalActive, setIsModalActive] = useState(false); const [isArchiveModalActive, setIsArchiveModalActive] = useState(false); - const [showSellerWhitelistForm, setShowSellerWhitelistForm] = useState(false); const [showAdjustForm, setShowAdjustForm] = useState(false); const [isEditModalActive, setIsEditModalActive] = useState(false); const [editContractData, setEditContractData] = useState({}); @@ -430,10 +428,6 @@ function SellerHub({ }) .catch(error => { setIsModalActive(false); - if (error.message == 'seller is not whitelisted') { - setShowSellerWhitelistForm(true); - return; - } context.toast('error', error.message || error); }) .finally(() => { @@ -579,14 +573,6 @@ function SellerHub({ showSuccess={false} /> - { - setShowSellerWhitelistForm(false); - }} - /> - { - close(e); - }; - const handlePropagation = e => e.stopPropagation(); - - if (!isActive) { - return <>; - } - - return ( - - - {CloseModal(handleClose)} - - You are not whitelisted as Seller - -

- Lumerin is hand-selecting the first few hashrate sellers for mainnet - in order to ensure high quality contracts in this initial launch phase - of the marketplace. -

-

- If you are interested in becoming a seller please fill out the form -

- - - { - window.open(formUrl, '_blank'); - close(); - }} - > - Open Form - - - -
- ); -} - -export default withClient(SellerWhitelistModal); diff --git a/src/store/hocs/withContractsState.js b/src/store/hocs/withContractsState.js index b22e7c11..bf7a3c78 100644 --- a/src/store/hocs/withContractsState.js +++ b/src/store/hocs/withContractsState.js @@ -86,7 +86,6 @@ const withContractsState = WrappedComponent => { ethCoinPrice: selectors.getRateEth(state), btcCoinPrice: selectors.getRateBtc(state), selectedCurrency: selectors.getSellerSelectedCurrency(state), - formUrl: selectors.getSellerWhitelistForm(state), autoAdjustPriceInterval: selectors.getAutoAdjustPriceInterval(state), autoAdjustContractPriceTimeout: selectors.getAutoAdjustContractPriceTimeout( state diff --git a/src/store/selectors/config.js b/src/store/selectors/config.js index 8aca29a5..3e7299ba 100644 --- a/src/store/selectors/config.js +++ b/src/store/selectors/config.js @@ -35,6 +35,3 @@ export const getSellerSelectedCurrency = state => state.config.sellerCurrency; export const getSellerDefaultCurrency = state => state.config.chain.defaultSellerCurrency; - -export const getSellerWhitelistForm = state => - state.config.chain.sellerWhitelistUrl;