From 9df8158e2d4a0c01fc0fc86cdf03df6411b163c1 Mon Sep 17 00:00:00 2001 From: Dawn <13477199767@163.com> Date: Fri, 22 Nov 2024 10:10:53 +0800 Subject: [PATCH] fix: Modify the feeRate of 1-btc-transfer-all case to be obtained dynamically --- tests/rgbpp/xudt/btc-transfer-all/1-btc-transfer-all.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/rgbpp/xudt/btc-transfer-all/1-btc-transfer-all.ts b/tests/rgbpp/xudt/btc-transfer-all/1-btc-transfer-all.ts index ac637bb3..f9e1d166 100644 --- a/tests/rgbpp/xudt/btc-transfer-all/1-btc-transfer-all.ts +++ b/tests/rgbpp/xudt/btc-transfer-all/1-btc-transfer-all.ts @@ -3,7 +3,7 @@ import { buildRgbppTransferAllTxs, sendRgbppTxGroups } from 'rgbpp'; import { btcDataSource, isMainnet, collector, btcAccount } from '../../env'; import { signPsbt } from '../../../../examples/rgbpp/shared/btc-account'; import { saveCkbVirtualTxResult } from '../../../../examples/rgbpp/shared/utils'; -import { readStepLog } from '../../shared/utils'; +import { getFastestFeeRate, readStepLog } from '../../shared/utils'; interface TestParams { xudtTypeArgs: string; @@ -12,6 +12,9 @@ interface TestParams { } const rgbppTransferAllTxs = async ({ xudtTypeArgs, fromAddress, toAddress }: TestParams) => { + const feeRate = await getFastestFeeRate(); + console.log('feeRate = ', feeRate); + const result = await buildRgbppTransferAllTxs({ ckb: { xudtTypeArgs, @@ -22,7 +25,7 @@ const rgbppTransferAllTxs = async ({ xudtTypeArgs, fromAddress, toAddress }: Tes fromAddress: fromAddress, toAddress: toAddress, dataSource: btcDataSource, - feeRate: 5, + feeRate: feeRate, }, isMainnet, });