From 95df0e2fe40be895cff9e6f54307c364bffe9794 Mon Sep 17 00:00:00 2001 From: Onno Visser <23527729+onnovisser@users.noreply.github.com> Date: Wed, 25 Oct 2023 09:15:29 +0200 Subject: [PATCH] remove debug --- centrifuge-app/.env-config/.env.development | 24 +++++++++---------- .../components/InvestRedeem/InvestRedeem.tsx | 2 +- .../InvestRedeemLiquidityPoolsProvider.tsx | 1 - .../LiquidityRewardsProvider.tsx | 1 - .../src/components/Swaps/Orders.tsx | 2 -- centrifuge-app/src/components/Swaps/Swap.tsx | 1 - .../IssuerPool/Investors/InvestorStatus.tsx | 1 - centrifuge-app/src/utils/useLiquidityPools.ts | 1 - centrifuge-js/src/modules/liquidityPools.ts | 13 +--------- 9 files changed, 14 insertions(+), 32 deletions(-) diff --git a/centrifuge-app/.env-config/.env.development b/centrifuge-app/.env-config/.env.development index 2c9953161d..3b1dce5cf4 100644 --- a/centrifuge-app/.env-config/.env.development +++ b/centrifuge-app/.env-config/.env.development @@ -1,20 +1,20 @@ -REACT_APP_COLLATOR_WSS_URL=wss://fullnode.moonbase-dev.cntrfg.com/public-ws -REACT_APP_DEFAULT_NODE_URL=https://pod.moonbeam-alpha.k-f.dev -REACT_APP_DEFAULT_UNLIST_POOLS=true -REACT_APP_FAUCET_URL=https://europe-central2-peak-vista-185616.cloudfunctions.net/faucet-api-moonbean-alpha +REACT_APP_COLLATOR_WSS_URL=wss://fullnode.development.cntrfg.com +REACT_APP_DEFAULT_NODE_URL=https://pod-development.k-f.dev +REACT_APP_DEFAULT_UNLIST_POOLS=false +REACT_APP_FAUCET_URL=https://europe-central2-peak-vista-185616.cloudfunctions.net/faucet-api-dev REACT_APP_IPFS_GATEWAY=https://centrifuge.mypinata.cloud/ -REACT_APP_IS_DEMO=true -REACT_APP_ONBOARDING_API_URL=https://europe-central2-peak-vista-185616.cloudfunctions.net/onboarding-api-moonbean-alpha -REACT_APP_PINNING_API_URL=https://europe-central2-peak-vista-185616.cloudfunctions.net/pinning-api-moonbean-alpha +REACT_APP_IS_DEMO=false +REACT_APP_NETWORK=centrifuge +REACT_APP_ONBOARDING_API_URL=https://europe-central2-peak-vista-185616.cloudfunctions.net/onboarding-api-dev +REACT_APP_PINNING_API_URL=https://europe-central2-peak-vista-185616.cloudfunctions.net/pinning-api-dev REACT_APP_POOL_CREATION_TYPE=immediate -REACT_APP_RELAY_WSS_URL=wss://frag-moonbase-relay-rpc-ws.g.moonbase.moonbeam.network -REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools-demo +REACT_APP_RELAY_WSS_URL=wss://fullnode-relay.development.cntrfg.com +REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools-development REACT_APP_SUBSCAN_URL= REACT_APP_TINLAKE_NETWORK=goerli REACT_APP_INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550 REACT_APP_WHITELISTED_ACCOUNTS= -REACT_APP_NETWORK=centrifuge +REACT_APP_TINLAKE_SUBGRAPH_URL=https://graph.centrifuge.io/tinlake REACT_APP_REWARDS_TREE_URL=https://storage.googleapis.com/rad-rewards-trees-kovan-staging/latest.json -REACT_APP_MEMBERLIST_ADMIN_PURE_PROXY=kALwmJutBq95s41U9fWnoApCUgvPqPGTh1GSmFnQh5f9fWo93 REACT_APP_WALLETCONNECT_ID=c32fa79350803519804a67fcab0b742a -REACT_APP_TINLAKE_SUBGRAPH_URL=https://graph.centrifuge.io/tinlake +REACT_APP_MEMBERLIST_ADMIN_PURE_PROXY=kAJ27w29x7gHM75xajP2yXVLjVBaKmmUTxHwgRuCoAcWaoEiz \ No newline at end of file diff --git a/centrifuge-app/src/components/InvestRedeem/InvestRedeem.tsx b/centrifuge-app/src/components/InvestRedeem/InvestRedeem.tsx index 4d37056aac..53bec2d3d4 100644 --- a/centrifuge-app/src/components/InvestRedeem/InvestRedeem.tsx +++ b/centrifuge-app/src/components/InvestRedeem/InvestRedeem.tsx @@ -211,7 +211,7 @@ type InnerProps = Props & { } function InvestRedeemInner({ view, setView, setTrancheId, networks }: InnerProps) { - const { state, actions } = useInvestRedeem() + const { state } = useInvestRedeem() const pool = usePool(state.poolId) const isTinlakePool = state.poolId.startsWith('0x') diff --git a/centrifuge-app/src/components/InvestRedeem/InvestRedeemLiquidityPoolsProvider.tsx b/centrifuge-app/src/components/InvestRedeem/InvestRedeemLiquidityPoolsProvider.tsx index b098728aa3..b27f344a98 100644 --- a/centrifuge-app/src/components/InvestRedeem/InvestRedeemLiquidityPoolsProvider.tsx +++ b/centrifuge-app/src/components/InvestRedeem/InvestRedeemLiquidityPoolsProvider.tsx @@ -15,7 +15,6 @@ export function InvestRedeemLiquidityPoolsProvider({ poolId, trancheId, children const centAddress = useAddress('substrate') const evmAddress = useAddress('evm') - console.log('evmAddress', evmAddress) const { data: evmNativeBalance } = useEvmNativeBalance(evmAddress) const evmNativeCurrency = useEvmNativeCurrency() const centOrder = usePendingCollect(poolId, trancheId, centAddress) diff --git a/centrifuge-app/src/components/LiquidityRewards/LiquidityRewardsProvider.tsx b/centrifuge-app/src/components/LiquidityRewards/LiquidityRewardsProvider.tsx index 0cb0c5140c..ec7f9fd274 100644 --- a/centrifuge-app/src/components/LiquidityRewards/LiquidityRewardsProvider.tsx +++ b/centrifuge-app/src/components/LiquidityRewards/LiquidityRewardsProvider.tsx @@ -10,7 +10,6 @@ import { LiquidityRewardsContext } from './LiquidityRewardsContext' import { LiquidityRewardsActions, LiquidityRewardsProviderProps, LiquidityRewardsState } from './types' export function LiquidityRewardsProvider(props: LiquidityRewardsProviderProps) { - // const { connectedType, isEvmOnSubstrate } = useWallet() const isTinlakePool = props.poolId.startsWith('0x') return !isTinlakePool ? : <>{props.children} } diff --git a/centrifuge-app/src/components/Swaps/Orders.tsx b/centrifuge-app/src/components/Swaps/Orders.tsx index d5ed8f8183..4439f14fa0 100644 --- a/centrifuge-app/src/components/Swaps/Orders.tsx +++ b/centrifuge-app/src/components/Swaps/Orders.tsx @@ -194,8 +194,6 @@ export function SwapAndSendDialog({ open, onClose, order }: { open: boolean; onC let orderBuyCurrencyEVMChain = getCurrencyChainId(order.buyCurrency) let orderSellCurrencyEVMChain = getCurrencyChainId(order.sellCurrency) - console.log('orderBuyCurrencyEVMChain', orderBuyCurrencyEVMChain, orderSellCurrencyEVMChain) - const { execute, reset, isLoading, lastCreatedTransaction } = useCentrifugeTransaction( 'Fulfill order', (cent) => (args: [transferTo: string | null], options) => { diff --git a/centrifuge-app/src/components/Swaps/Swap.tsx b/centrifuge-app/src/components/Swaps/Swap.tsx index 8934fab9b8..10cd9435be 100644 --- a/centrifuge-app/src/components/Swaps/Swap.tsx +++ b/centrifuge-app/src/components/Swaps/Swap.tsx @@ -37,7 +37,6 @@ export function Swap({ defaultBuy, defaultSell }: SwapProps) { const buyDec = lastChanged === 'buy' ? buy : Dec(sell).div(price) const buyAmount = CurrencyBalance.fromFloat(buyDec, buyCurrency!.decimals) const buyPrice = Rate.fromFloat(price) - console.log('buy', buy, buyAmount, buyCurrencyKey, sellCurrencyKey) return cent.wrapSignAndSend( api, api.tx.orderBook.createOrderV1(buyCurrencyKey, sellCurrencyKey, buyAmount, buyPrice), diff --git a/centrifuge-app/src/pages/IssuerPool/Investors/InvestorStatus.tsx b/centrifuge-app/src/pages/IssuerPool/Investors/InvestorStatus.tsx index 4d0f253f98..e01de2c63b 100644 --- a/centrifuge-app/src/pages/IssuerPool/Investors/InvestorStatus.tsx +++ b/centrifuge-app/src/pages/IssuerPool/Investors/InvestorStatus.tsx @@ -46,7 +46,6 @@ export function InvestorStatus() { const centAddress = chain && validAddress ? utils.evmToSubstrateAddress(address, chain) : validAddress const permissions = usePermissions(centAddress) - console.log('permissions', permissions) const [pendingTrancheId, setPendingTrancheId] = React.useState('') const { showLiquidityPoolsOptions } = useDebugFlags() diff --git a/centrifuge-app/src/utils/useLiquidityPools.ts b/centrifuge-app/src/utils/useLiquidityPools.ts index 3b13c9b002..3fe0e2520a 100644 --- a/centrifuge-app/src/utils/useLiquidityPools.ts +++ b/centrifuge-app/src/utils/useLiquidityPools.ts @@ -32,7 +32,6 @@ export function useActiveDomains(poolId: string, suspense?: boolean) { return [manager, pool] as const }) ) - console.log('results', results) return results .map((result, i) => { if (result.status === 'rejected') { diff --git a/centrifuge-js/src/modules/liquidityPools.ts b/centrifuge-js/src/modules/liquidityPools.ts index 81cf00ac01..73f6ed1aa1 100644 --- a/centrifuge-js/src/modules/liquidityPools.ts +++ b/centrifuge-js/src/modules/liquidityPools.ts @@ -251,7 +251,6 @@ export function getLiquidityPoolsModule(inst: Centrifuge) { const currencies = await firstValueFrom(getDomainCurrencies([chainId])) const poolManager = (await contract(investmentManager, ABI.InvestmentManager, options).poolManager()) as string - console.log('poolManager', investmentManager, poolManager, poolId, trancheIds, currencies) const poolData = await multicall<{ isActive: boolean @@ -364,7 +363,6 @@ export function getLiquidityPoolsModule(inst: Centrifuge) { } ) - console.log('lpData', lpData) const lps = lpData.lps?.filter((lp) => lp !== NULL_ADDRESS) if (!lps?.length) return [] @@ -389,8 +387,6 @@ export function getLiquidityPoolsModule(inst: Centrifuge) { } ) - console.log('assetData', assetData) - if (!assetData.assets?.length) return [] const currencyData = await multicall<{ @@ -413,6 +409,7 @@ export function getLiquidityPoolsModule(inst: Centrifuge) { call: ['function decimals() view returns (uint8)'], returns: [[`currencies[${i}].currencyDecimals`]], }, + // TODO: Enable again after testing that it works // { // target: assetAddress, // call: ['function PERMIT_TYPEHASH() view returns (bytes32)'], @@ -445,8 +442,6 @@ export function getLiquidityPoolsModule(inst: Centrifuge) { } ) - console.log('currencyData', currencyData, assetData) - const result = lps.map((addr, i) => ({ lpAddress: addr, currencyAddress: assetData.assets![i], @@ -551,12 +546,6 @@ export function getLiquidityPoolsModule(inst: Centrifuge) { rpcProvider: options?.rpcProvider ?? inst.config.evmSigner?.provider!, }) - console.log('pool.anagerCurrencyAllowance', pool.managerCurrencyAllowance) - - // TODO: Remove. just for testing - if (pool.tokenPrice.isZero()) { - pool.tokenPrice = Price.fromFloat(1) - } return pool }