From 6f707b78c15e5a68369597430cd9b21583baa6d9 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Sun, 4 Oct 2020 17:25:00 +1300 Subject: [PATCH] Bugfix --- core.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core.lua b/core.lua index 6389438..16dcc30 100644 --- a/core.lua +++ b/core.lua @@ -148,15 +148,17 @@ local function sync_callback(res) end -- Periodically sync with lurkcoin. +local exchange_rate_set local function sync() get('pending_transactions', nil, sync_callback) -- Only set lurkcoin.exchange_rate once - if not lurkcoin.exchange_rate then + if not exchange_rate_set then get('exchange_rates', {source = lurkcoin.server_name, target = '', amount = 1}, function(res) if res.success and type(res.result) == 'number' then lurkcoin.exchange_rate = res.result + exchange_rate_set = true end end) end