diff --git a/src/main/java/com/sparrowwallet/sparrow/whirlpool/dataSource/SparrowDataSource.java b/src/main/java/com/sparrowwallet/sparrow/whirlpool/dataSource/SparrowDataSource.java index 2c3852d0..8aea2f66 100644 --- a/src/main/java/com/sparrowwallet/sparrow/whirlpool/dataSource/SparrowDataSource.java +++ b/src/main/java/com/sparrowwallet/sparrow/whirlpool/dataSource/SparrowDataSource.java @@ -158,9 +158,8 @@ public class SparrowDataSource extends WalletResponseDataSource { walletResponse.info.latest_block.time = AppServices.getLatestBlockHeader() == null ? 1 : AppServices.getLatestBlockHeader().getTime(); walletResponse.info.fees = new LinkedHashMap<>(); - MinerFee minerFee = getMinerFeeSupplier().getValue(); for(MinerFeeTarget target : MinerFeeTarget.values()) { - walletResponse.info.fees.put(target.getValue(), minerFee.get(target)); + walletResponse.info.fees.put(target.getValue(), getMinerFeeSupplier().getFee(target)); } return walletResponse; diff --git a/src/main/java/com/sparrowwallet/sparrow/whirlpool/dataSource/SparrowMinerFeeSupplier.java b/src/main/java/com/sparrowwallet/sparrow/whirlpool/dataSource/SparrowMinerFeeSupplier.java index 12a2a387..3eddd8a2 100644 --- a/src/main/java/com/sparrowwallet/sparrow/whirlpool/dataSource/SparrowMinerFeeSupplier.java +++ b/src/main/java/com/sparrowwallet/sparrow/whirlpool/dataSource/SparrowMinerFeeSupplier.java @@ -1,11 +1,13 @@ package com.sparrowwallet.sparrow.whirlpool.dataSource; -import com.samourai.wallet.api.backend.MinerFee; import com.samourai.wallet.api.backend.MinerFeeTarget; import com.samourai.whirlpool.client.wallet.data.minerFee.MinerFeeSupplier; import com.sparrowwallet.sparrow.AppServices; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; public class SparrowMinerFeeSupplier implements MinerFeeSupplier { private static final int FALLBACK_FEE_RATE = 75; @@ -30,15 +32,6 @@ public class SparrowMinerFeeSupplier implements MinerFeeSupplier { return getMinimumFeeForTarget(Integer.parseInt(feeTarget.getValue())); } - @Override - public MinerFee getValue() { - Map fees = new LinkedHashMap<>(); - for (MinerFeeTarget minerFeeTarget : MinerFeeTarget.values()) { - fees.put(minerFeeTarget.getValue(), getFee(minerFeeTarget)); - } - return new MinerFee(fees); - } - private Integer getMinimumFeeForTarget(int targetBlocks) { List> feeRates = new ArrayList<>(AppServices.getTargetBlockFeeRates().entrySet()); Collections.reverse(feeRates); diff --git a/src/main/java/com/sparrowwallet/sparrow/whirlpool/dataSource/SparrowWalletStateSupplier.java b/src/main/java/com/sparrowwallet/sparrow/whirlpool/dataSource/SparrowWalletStateSupplier.java index 93922d5d..8335cc78 100644 --- a/src/main/java/com/sparrowwallet/sparrow/whirlpool/dataSource/SparrowWalletStateSupplier.java +++ b/src/main/java/com/sparrowwallet/sparrow/whirlpool/dataSource/SparrowWalletStateSupplier.java @@ -89,11 +89,6 @@ public class SparrowWalletStateSupplier implements WalletStateSupplier { // nothing required } - @Override - public void setWalletIndex(WhirlpoolAccount whirlpoolAccount, AddressType addressType, Chain chain, int i) throws Exception { - // nothing required - } - @Override public void load() throws Exception { // nothing required