From 3aa7df084e49adc10a542d2cf608e7c296ca9bff Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 8 Nov 2023 22:20:50 +0800 Subject: [PATCH] feat: update das-lib --- txtool/update_sub_account.go | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/txtool/update_sub_account.go b/txtool/update_sub_account.go index 570dcea3..0460d1d7 100644 --- a/txtool/update_sub_account.go +++ b/txtool/update_sub_account.go @@ -354,27 +354,15 @@ func (s *SubAccountTxTool) BuildUpdateSubAccountTx(p *ParamBuildUpdateSubAccount dpRecycleWhitelist = dpRecycleWhitelistMap[k] } - dpContract, err := core.GetDasContractInfo(common.DasContractNameDpCellType) - if err != nil { - return nil, fmt.Errorf("GetDasContractInfo err: %s", err.Error()) - } - - dpBaseCapacity := types.CellOutput{ - Lock: managerDasLock, - Type: dpContract.ToScript(nil), - }.OccupiedCapacity(make([]byte, 12)) - - dpOutputCells, dpOutputData, replenishNormal, err := core.SplitDPCell(&core.ParamSplitDPCell{ + dpOutputCells, dpOutputData, replenishNormal, err := s.DasCore.SplitDPCell(&core.ParamSplitDPCell{ FromLock: managerDasLock, ToLock: dpRecycleWhitelist, DPLiveCell: manualDpLiveCells, DPLiveCellCapacity: manualTotalCapacity, DPTotalAmount: manualTotalAmount, DPTransferAmount: manualPrice, - DPBaseCapacity: dpBaseCapacity, - DPContract: dpContract, DPSplitCount: 2, - DPSplitAmount: 100, + DPSplitAmount: 25 * common.UsdRateBase, NormalCellLock: dpRecycleWhitelist, }) if err != nil {