Skip to content

Commit

Permalink
fix: Modify the feeRate of 1-btc-transfer-all case to be obtained dyn…
Browse files Browse the repository at this point in the history
…amically
  • Loading branch information
Dawn-githup committed Nov 22, 2024
1 parent 68ae1c3 commit 9df8158
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/rgbpp/xudt/btc-transfer-all/1-btc-transfer-all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
Expand All @@ -22,7 +25,7 @@ const rgbppTransferAllTxs = async ({ xudtTypeArgs, fromAddress, toAddress }: Tes
fromAddress: fromAddress,
toAddress: toAddress,
dataSource: btcDataSource,
feeRate: 5,
feeRate: feeRate,
},
isMainnet,
});
Expand Down

0 comments on commit 9df8158

Please sign in to comment.