Skip to content

Commit ffd7f60

Browse files
committed
Removed the explicit timestamp.
1 parent 3a24454 commit ffd7f60

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/xrc_demo/main.mo

+3-5
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ actor {
1313

1414
/// Extract the current exchange rate for the given symbol.
1515
public func get_exchange_rate(symbol : Text) : async Float {
16-
let time_sec = Time.now() / 1_000_000_000;
17-
// Use the previous minute to increase the chance of getting a rate because
18-
// not every exchange has data available for the current minute.
19-
let time = Nat64.fromIntWrap(time_sec - 60);
16+
2017
let request : XRC.GetExchangeRateRequest = {
2118
base_asset = {
2219
symbol = symbol;
@@ -26,7 +23,8 @@ actor {
2623
symbol = "USDT";
2724
class_ = #Cryptocurrency;
2825
};
29-
timestamp = ?time;
26+
// Get the current rate.
27+
timestamp = null;
3028
};
3129

3230
// Every XRC call needs 10B cycles.

0 commit comments

Comments
 (0)