From 119dfb8d1c99be7551c0e3774bd8a59896374fc1 Mon Sep 17 00:00:00 2001 From: Dylan Duan Date: Wed, 31 Jul 2024 19:52:55 +0800 Subject: [PATCH] chore: Format code --- apps/service/src/json-rpc/json-rpc.server.ts | 2 +- packages/ckb/src/utils/ckb-tx.ts | 8 +------- packages/ckb/src/utils/rgbpp.ts | 6 +----- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/apps/service/src/json-rpc/json-rpc.server.ts b/apps/service/src/json-rpc/json-rpc.server.ts index f556f6d5..6234d39e 100644 --- a/apps/service/src/json-rpc/json-rpc.server.ts +++ b/apps/service/src/json-rpc/json-rpc.server.ts @@ -50,7 +50,7 @@ export class JsonRpcServer { } const name = metadata.name ? `${metadata.name}.${methodMetadata.name ?? methodName}` - : methodMetadata.name ?? methodName; + : (methodMetadata.name ?? methodName); const handler = (params: unknown) => { const instanceRef = this.moduleRef.get(instance.constructor, { strict: false }); return instanceRef[methodName](params); diff --git a/packages/ckb/src/utils/ckb-tx.ts b/packages/ckb/src/utils/ckb-tx.ts index c6bd196c..9c8bfc2d 100644 --- a/packages/ckb/src/utils/ckb-tx.ts +++ b/packages/ckb/src/utils/ckb-tx.ts @@ -1,10 +1,4 @@ -import { - PERSONAL, - blake2b, - hexToBytes, - serializeInput, - serializeScript, -} from '@nervosnetwork/ckb-sdk-utils'; +import { PERSONAL, blake2b, hexToBytes, serializeInput, serializeScript } from '@nervosnetwork/ckb-sdk-utils'; import { RawClusterData, packRawClusterData, SporeDataProps, packRawSporeData } from '@spore-sdk/core'; import { remove0x, u64ToLe } from './hex'; import { diff --git a/packages/ckb/src/utils/rgbpp.ts b/packages/ckb/src/utils/rgbpp.ts index dd5c3634..c94d0a81 100644 --- a/packages/ckb/src/utils/rgbpp.ts +++ b/packages/ckb/src/utils/rgbpp.ts @@ -20,11 +20,7 @@ import { RgbppCkbTxInputsExceededError, RgbppUtxoBindMultiTypeAssetsError, } from '../error'; -import { - calculateRgbppCellCapacity, - isScriptEqual, - isUDTTypeSupported, -} from './ckb-tx'; +import { calculateRgbppCellCapacity, isScriptEqual, isUDTTypeSupported } from './ckb-tx'; import { blockchain } from '@ckb-lumos/base'; import { bytesToHex,