diff --git a/src/hooks/offramp/useMainProcess.ts b/src/hooks/offramp/useMainProcess.ts index 626c9379..b6d5f1b4 100644 --- a/src/hooks/offramp/useMainProcess.ts +++ b/src/hooks/offramp/useMainProcess.ts @@ -10,7 +10,7 @@ import { OFFRAMPING_PHASE_SECONDS } from '../../pages/progress'; import { createTransactionEvent, useEventsContext } from '../../contexts/events'; import { useAssetHubNode, usePendulumNode } from '../../contexts/polkadotNode'; import { usePolkadotWalletState } from '../../contexts/polkadotWallet'; -import { useNetwork } from '../../contexts/network'; +import { Networks, useNetwork } from '../../contexts/network'; import { clearOfframpingState, @@ -157,7 +157,8 @@ export const useMainProcess = () => { }, [updateHookStateFromState, offrampingState]); useEffect(() => { - //if (wagmiConfig.state.status !== 'connected') return; + if (selectedNetwork == Networks.Polygon && wagmiConfig.state.status !== 'connected') return; + if (selectedNetwork == Networks.AssetHub && !walletAccount?.address) return; (async () => { if (!pendulumNode || !assetHubNode) { @@ -191,6 +192,7 @@ export const useMainProcess = () => { pendulumNode, assetHubNode, wagmiConfig.state.status, + walletAccount?.address, ]); const maybeCancelSep24First = useCallback(() => { diff --git a/src/services/anchor/index.ts b/src/services/anchor/index.ts index a5a4882c..721d9426 100644 --- a/src/services/anchor/index.ts +++ b/src/services/anchor/index.ts @@ -295,7 +295,6 @@ export async function sep24Second( let status; do { - console.log('Waiting for the anchor pending flag'); await new Promise((resolve) => setTimeout(resolve, 1000)); const idParam = new URLSearchParams({ id }); const statusResponse = await fetch(`${sep24Url}/transaction?${idParam.toString()}`, { @@ -307,7 +306,6 @@ export async function sep24Second( } const { transaction } = await statusResponse.json(); - console.log('Transaction status:', transaction); status = transaction; } while (status.status !== 'pending_user_transfer_start'); diff --git a/src/services/phases/polkadot/index.tsx b/src/services/phases/polkadot/index.tsx index c776be22..27f3d1c4 100644 --- a/src/services/phases/polkadot/index.tsx +++ b/src/services/phases/polkadot/index.tsx @@ -51,7 +51,6 @@ export async function prepareSpacewalkRedeemTransaction( const stellarTargetAccountIdRaw = stellarTargetKeypair.rawPublicKey(); try { - console.log('Creating vault service'); const vaultService = await createVaultService( pendulumNode, outputToken.stellarAsset.code.hex, diff --git a/src/services/phases/polkadot/spacewalk.tsx b/src/services/phases/polkadot/spacewalk.tsx index 83ca3d2a..c57c98ba 100644 --- a/src/services/phases/polkadot/spacewalk.tsx +++ b/src/services/phases/polkadot/spacewalk.tsx @@ -86,7 +86,6 @@ export async function getVaultsForCurrency( assetIssuerHex: string, redeemableAmountRaw: string, ) { - console.log('Getting vaults for currency', assetCodeHex, assetIssuerHex, redeemableAmountRaw); const vaultEntries = await api.query.vaultRegistry.vaults.entries(); const vaults = vaultEntries.map(([_, value]) => value.unwrap()); @@ -152,7 +151,6 @@ export class VaultService { options.era = 0; const stellarPkBytes = Uint8Array.from(stellarPkBytesBuffer); - console.log('Creating redeem tx for vault', prettyPrintVaultId(this.vaultId)); return this.apiComponents!.api.tx.redeem.requestRedeem(amountRaw, stellarPkBytes, this.vaultId!).signAsync( addressOrPair, options, diff --git a/src/services/phases/signedTransactions.ts b/src/services/phases/signedTransactions.ts index aad67d20..4f951ff7 100644 --- a/src/services/phases/signedTransactions.ts +++ b/src/services/phases/signedTransactions.ts @@ -38,7 +38,6 @@ export async function prepareTransactions(state: OfframpingState, context: Execu } = state; const { pendulumNode } = context; - console.log('Preparing transactions....'); const spacewalkRedeemTransaction = await prepareSpacewalkRedeemTransaction(state, context); const nablaApproveTransaction = await prepareNablaApproveTransaction(state, context); const nablaSwapTransaction = await prepareNablaSwapTransaction(state, context); diff --git a/src/services/phases/stellar/index.tsx b/src/services/phases/stellar/index.tsx index afa9c445..c233fff1 100644 --- a/src/services/phases/stellar/index.tsx +++ b/src/services/phases/stellar/index.tsx @@ -202,7 +202,7 @@ async function setupStellarAccount( createAccountTransaction.sign(ephemeralKeypair); try { - //await horizonServer.submitTransaction(createAccountTransaction); + await horizonServer.submitTransaction(createAccountTransaction); } catch (error: unknown) { const horizonError = error as { response: { data: { extras: any } } }; console.error('Transaction submission to horizon failed', horizonError.toString());