introduce currencyrate to hold fiat rate

This commit is contained in:
Craig Raw
2020-07-10 18:26:56 +02:00
parent c477d31d3d
commit d6218f2a58
5 changed files with 53 additions and 23 deletions
@@ -1,6 +1,7 @@
package com.sparrowwallet.sparrow.control;
import com.sparrowwallet.drongo.protocol.Transaction;
import com.sparrowwallet.sparrow.CurrencyRate;
import javafx.beans.property.*;
import javafx.scene.control.ContextMenu;
import javafx.scene.control.MenuItem;
@@ -70,6 +71,10 @@ public class FiatLabel extends CopyableLabel {
this.currencyProperty.set(currency);
}
public final void set(CurrencyRate currencyRate, long value) {
set(currencyRate.getCurrency(), currencyRate.getBtcRate(), value);
}
public final void set(Currency currency, double btcRate, long value) {
setValue(value);
setBtcRate(btcRate);