log shop transactions
This commit is contained in:
@@ -206,7 +206,7 @@ local function run(member, point)
|
|||||||
turtle._goto(spt)
|
turtle._goto(spt)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
_debug(m)
|
|
||||||
turtles[member.id] = nil
|
turtles[member.id] = nil
|
||||||
member.status = m
|
member.status = m
|
||||||
member.active = false
|
member.active = false
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
local Util = require('util')
|
||||||
|
|
||||||
local fs = _G.fs
|
local fs = _G.fs
|
||||||
local os = _G.os
|
local os = _G.os
|
||||||
local shell = _ENV.shell
|
local shell = _ENV.shell
|
||||||
@@ -30,6 +32,7 @@ local domain = args[1] or Syntax()
|
|||||||
local password = args[2] or Syntax()
|
local password = args[2] or Syntax()
|
||||||
local privatekey = k.toKristWalletFormat(password)
|
local privatekey = k.toKristWalletFormat(password)
|
||||||
local address = k.makev2address(privatekey)
|
local address = k.makev2address(privatekey)
|
||||||
|
local transactions = Util.readTable('/usr/transaction.log') or { }
|
||||||
|
|
||||||
jua.on("terminate", function()
|
jua.on("terminate", function()
|
||||||
rs.setOutput('top', false)
|
rs.setOutput('top', false)
|
||||||
@@ -52,6 +55,9 @@ local function getItemDetails(item)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function logTransaction(transaction, details)
|
local function logTransaction(transaction, details)
|
||||||
|
transaction.details = details
|
||||||
|
table.insert(transactions, transaction)
|
||||||
|
Util.writeTable('/usr/transaction.log', transactions)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function handleTransaction(transaction)
|
local function handleTransaction(transaction)
|
||||||
|
|||||||
Reference in New Issue
Block a user