Skip to content

Commit

Permalink
cleanup test logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gianfra-t committed Dec 20, 2024
1 parent e501f87 commit dc7f68d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 9 deletions.
6 changes: 4 additions & 2 deletions src/hooks/offramp/useMainProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -191,6 +192,7 @@ export const useMainProcess = () => {
pendulumNode,
assetHubNode,
wagmiConfig.state.status,
walletAccount?.address,
]);

const maybeCancelSep24First = useCallback(() => {
Expand Down
2 changes: 0 additions & 2 deletions src/services/anchor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()}`, {
Expand All @@ -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');

Expand Down
1 change: 0 additions & 1 deletion src/services/phases/polkadot/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions src/services/phases/polkadot/spacewalk.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/services/phases/signedTransactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/services/phases/stellar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit dc7f68d

Please sign in to comment.