mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-02 03:36:24 -04:00
use more cached wallet state instead of direct queries
This commit is contained in:
parent
a5883d7bcd
commit
e96b875232
7 changed files with 18 additions and 15 deletions
|
@ -22,7 +22,6 @@ import de.jensd.fx.fontawesome.AwesomeDude;
|
|||
import de.jensd.fx.fontawesome.AwesomeIcon;
|
||||
import haveno.common.util.Utilities;
|
||||
import haveno.core.locale.Res;
|
||||
import haveno.core.trade.HavenoUtils;
|
||||
import haveno.desktop.main.overlays.popups.Popup;
|
||||
import haveno.desktop.util.GUIUtil;
|
||||
import javafx.beans.property.ObjectProperty;
|
||||
|
@ -158,7 +157,6 @@ public class AddressTextField extends AnchorPane {
|
|||
return GUIUtil.getMoneroURI(
|
||||
address.get(),
|
||||
amount.get(),
|
||||
paymentLabel.get(),
|
||||
HavenoUtils.havenoSetup.getXmrWalletService().getWallet());
|
||||
paymentLabel.get());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1214,8 +1214,7 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
|
|||
return GUIUtil.getMoneroURI(
|
||||
addressTextField.getAddress(),
|
||||
model.getDataModel().getMissingCoin().get(),
|
||||
model.getPaymentLabel(),
|
||||
model.dataModel.getXmrWalletService().getWallet());
|
||||
model.getPaymentLabel());
|
||||
}
|
||||
|
||||
private void addAmountPriceFields() {
|
||||
|
|
|
@ -950,8 +950,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
|||
return GUIUtil.getMoneroURI(
|
||||
model.dataModel.getAddressEntry().getAddressString(),
|
||||
model.dataModel.getMissingCoin().get(),
|
||||
model.getPaymentLabel(),
|
||||
model.dataModel.getXmrWalletService().getWallet());
|
||||
model.getPaymentLabel());
|
||||
}
|
||||
|
||||
private void addAmountPriceFields() {
|
||||
|
|
|
@ -95,7 +95,6 @@ import javafx.util.StringConverter;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import monero.common.MoneroUtils;
|
||||
import monero.daemon.model.MoneroTx;
|
||||
import monero.wallet.MoneroWallet;
|
||||
import monero.wallet.model.MoneroTxConfig;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.bitcoinj.core.Coin;
|
||||
|
@ -686,7 +685,7 @@ public class GUIUtil {
|
|||
.show();
|
||||
}
|
||||
|
||||
public static String getMoneroURI(String address, BigInteger amount, String label, MoneroWallet wallet) {
|
||||
public static String getMoneroURI(String address, BigInteger amount, String label) {
|
||||
return MoneroUtils.getPaymentUri(new MoneroTxConfig()
|
||||
.setAddress(address)
|
||||
.setAmount(amount)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue