Skip to content

Commit

Permalink
remove debug
Browse files Browse the repository at this point in the history
  • Loading branch information
onnovisser committed Oct 25, 2023
1 parent 5b611a0 commit 95df0e2
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 32 deletions.
24 changes: 12 additions & 12 deletions centrifuge-app/.env-config/.env.development
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? <Provider {...props} /> : <>{props.children}</>
}
Expand Down
2 changes: 0 additions & 2 deletions centrifuge-app/src/components/Swaps/Orders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
1 change: 0 additions & 1 deletion centrifuge-app/src/components/Swaps/Swap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
1 change: 0 additions & 1 deletion centrifuge-app/src/utils/useLiquidityPools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
13 changes: 1 addition & 12 deletions centrifuge-js/src/modules/liquidityPools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 []

Expand All @@ -389,8 +387,6 @@ export function getLiquidityPoolsModule(inst: Centrifuge) {
}
)

console.log('assetData', assetData)

if (!assetData.assets?.length) return []

const currencyData = await multicall<{
Expand All @@ -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)'],
Expand Down Expand Up @@ -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],
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 95df0e2

Please sign in to comment.