File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
digital-currency/bitcoin/src/test/java/org/javamoney/shelter/bitcoin/provider Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 15
15
package org .javamoney .shelter .bitcoin .provider ;
16
16
17
17
import javax .money .CurrencyUnit ;
18
+ import javax .money .MonetaryCurrencies ;
18
19
import javax .money .MonetaryException ;
19
20
20
21
import org .javamoney .convert .ExchangeRate ;
21
- import org .javamoney .moneta .MoneyCurrency ;
22
22
import org .javamoney .shelter .bitcoin .BTCCurrency ;
23
23
24
24
@@ -33,13 +33,13 @@ public static void main(String... arg) throws MonetaryException {
33
33
//MtGoxV2ConversionProvider provider = new MtGoxV2ConversionProvider("USD");
34
34
MtGoxV2ConversionProvider provider = new MtGoxV2ConversionProvider ();
35
35
provider .loadRate ("USD" , true );
36
- ExchangeRate rate = provider .getExchangeRate (MoneyCurrency . of ("USD" ), btc );
36
+ ExchangeRate rate = provider .getExchangeRate (MonetaryCurrencies . getCurrency ("USD" ), btc );
37
37
System .out .println ("Rate: " + rate );
38
38
39
- rate = provider .getExchangeRate (MoneyCurrency . of ("EUR" ), btc );
39
+ rate = provider .getExchangeRate (MonetaryCurrencies . getCurrency ("EUR" ), btc );
40
40
System .out .println ("Rate2: " + rate );
41
41
42
- rate = provider .getExchangeRate (MoneyCurrency . of ("CHF" ), btc );
42
+ rate = provider .getExchangeRate (MonetaryCurrencies . getCurrency ("CHF" ), btc );
43
43
System .out .println ("Rate3: " + rate );
44
44
}
45
45
}
You can’t perform that action at this time.
0 commit comments