From 15b50530c90a2ac320ac15819fbb8e8679b71f9c Mon Sep 17 00:00:00 2001 From: Fabricius Zatti Date: Thu, 15 Aug 2024 17:00:48 -0300 Subject: [PATCH] fix meta error log --- .../app/core/pages/contracts-create/index.tsx | 17 +++++++++++++++-- frontend/src/soroban/contracts-service.tsx | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/core/pages/contracts-create/index.tsx b/frontend/src/app/core/pages/contracts-create/index.tsx index 367c66e..0079d4e 100644 --- a/frontend/src/app/core/pages/contracts-create/index.tsx +++ b/frontend/src/app/core/pages/contracts-create/index.tsx @@ -15,6 +15,7 @@ import { TOKEN_DECIMALS, } from 'soroban/contracts-service' import { StellarPlusError } from 'stellar-plus/lib/stellar-plus/error' +import { ConveyorBeltErrorMeta } from 'stellar-plus/lib/stellar-plus/error/helpers/conveyor-belt' import { CertificateOfDepositClient } from 'stellar-plus/lib/stellar-plus/soroban/contracts/certificate-of-deposit' import { AutoRestorePlugin } from 'stellar-plus/lib/stellar-plus/utils/pipeline/plugins/simulate-transaction' @@ -62,7 +63,13 @@ export const ContractsCreate: React.FC = () => { if (!contractId) { await token.wrapAndDeploy(opexTxInvocation).catch(error => { console.error('Error wrapping and deploying token', error) - console.log('Details', (error as StellarPlusError).meta) + console.log('Details', error as StellarPlusError) + console.log('Meta', (error as StellarPlusError).meta) + console.log( + 'Conveyor', + ((error as StellarPlusError).meta?.conveyorBeltErrorMeta as any) + .meta + ) console.log( 'Details', (error as StellarPlusError).meta?.sorobanSimulationData @@ -118,7 +125,13 @@ export const ContractsCreate: React.FC = () => { await codClient.deploy(opexTxInvocation).catch(error => { console.error('Error deploying contract', error) - console.error('Details', (error as StellarPlusError).meta) + console.log('Details', error as StellarPlusError) + console.log('Meta', (error as StellarPlusError).meta) + console.log( + 'Conveyor', + ((error as StellarPlusError).meta?.conveyorBeltErrorMeta as any).meta + ) + throw new Error('Error deploying contract') }) await codClient diff --git a/frontend/src/soroban/contracts-service.tsx b/frontend/src/soroban/contracts-service.tsx index beed510..3806767 100644 --- a/frontend/src/soroban/contracts-service.tsx +++ b/frontend/src/soroban/contracts-service.tsx @@ -24,7 +24,7 @@ import { STELLAR_NETWORK, WASM_HASH, vcRpcHandler } from './constants' export const TOKEN_DECIMALS = 10000000 export const BUMP_FEE = '100000000' -export const INNER_FEE = '1000000' +export const INNER_FEE = '10000000' const SECONDS_IN_DAY = 86400 const VALUE_TO_PERCENTAGE = 100 const TIMEOUT = 45