Skip to content

Commit

Permalink
avoid console.log directly (#620)
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Jan 5, 2024
1 parent e26e1cc commit ed77173
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
StorageValues,
connectParachains,
connectVertical,
defaultLogger,
fetchConfig,
setupWithServer,
} from '@acala-network/chopsticks'
Expand All @@ -13,6 +14,8 @@ import { HexString } from '@polkadot/util/types'
import { Keyring, createTestKeyring } from '@polkadot/keyring'
import { SubmittableExtrinsic } from '@polkadot/api-base/types'

const logger = defaultLogger.child({ module: 'utils' })

export * from './signFake.js'

export type SetupOption = {
Expand Down Expand Up @@ -167,7 +170,7 @@ export const sendTransaction = async (tx: Promise<SubmittableExtrinsic<'promise'
const signed = await tx
const deferred = defer<Codec[]>()
await signed.send((status) => {
console.log('tranaction status: ', status.status.toHuman())
logger.debug('tranaction status: ', status.status.toHuman())
if (status.isInBlock || status.isFinalized) {
deferred.resolve(status.events)
}
Expand Down

0 comments on commit ed77173

Please sign in to comment.