Skip to content

Commit

Permalink
fix crashes from krist minign
Browse files Browse the repository at this point in the history
  • Loading branch information
emmachase committed May 29, 2020
1 parent a184193 commit 448737e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

### 2.0.5
### Fixed
- Fix random crashes from krist mining

### 2.0.4
### Fixed
- Fix Discord Webhooks
Expand Down
2 changes: 1 addition & 1 deletion src/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

--#include "src/macros.lua"

local versionTag = "v2.0.4"
local versionTag = "v2.0.5"

local args = {...}
local layoutMode = args[1] == "--layout" or args[1] == "-l"
Expand Down
7 changes: 5 additions & 2 deletions src/sections/jua.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@ local function handleTransaction(data)

if tx.to == config.host then
if tx.metadata then
local meta = kapi.parseMeta(tx.metadata)
local meta = tx.metadata
if type(meta) == "string" then
meta = kapi.parseMeta(meta)
end

if meta.domain == config.name then
logger.info("Received " .. tx.value .. "kst from " .. tx.from .. " (Meta: " .. tx.metadata .. ")")
logger.info("Received " .. tx.value .. "kst from " .. tx.from .. " (Meta: " .. tostring(tx.metadata) .. ")")

processPayment(tx, meta)
end
Expand Down

0 comments on commit 448737e

Please sign in to comment.