diff --git a/neural/elytraFly.lua b/neural/elytraFly.lua index 9e8e9ed..d51af95 100644 --- a/neural/elytraFly.lua +++ b/neural/elytraFly.lua @@ -3,8 +3,8 @@ local Sound = require('sound') local Util = require('util') -local modules = _G.peripheral.wrap('back') -local os = _G.os +local modules = _G.peripheral.wrap('back') +local os = _G.os local parallel = _G.parallel if not modules.launch or not modules.getMetaOwner then diff --git a/swshop/shopConfig.lua b/swshop/shopConfig.lua index afc9eef..2b95a06 100644 --- a/swshop/shopConfig.lua +++ b/swshop/shopConfig.lua @@ -33,7 +33,12 @@ local wizardPage = UI.WizardPage { shadowText = "xxxx's shop", required = false, }, - [4] = UI.Chooser { + [4] = UI.Checkbox { + formLabel = 'Is private key', formKey = 'isPrivateKey', + help = 'Password is in private key format', + limit = 64, + }, + [5] = UI.Chooser { width = 9, formLabel = 'Font Size', formKey = 'textScale', nochoice = 'Small', diff --git a/swshop/shopView.lua b/swshop/shopView.lua index 76d97f6..2b306ab 100644 --- a/swshop/shopView.lua +++ b/swshop/shopView.lua @@ -18,7 +18,7 @@ local function startShop(node) if shopTab then multishell.terminate(shopTab) end - shopTab = shell.openTab('/packages/swshop/swshop.lua', node.domain, node.password) + shopTab = shell.openTab('/packages/swshop/swshop.lua', node.domain, node.password, node.isPrivateKey and 'true') end -- node has been reconfigured diff --git a/swshop/swshop.lua b/swshop/swshop.lua index 935e4f2..450bc8e 100644 --- a/swshop/swshop.lua +++ b/swshop/swshop.lua @@ -24,13 +24,13 @@ w.init(jua) k.init(jua, json, w, r) local function Syntax() - error('Syntax: swshop [domain] [password]') + error('Syntax: swshop [domain] [password | privateKey] [isPrivateKey]') end local args = { ... } local domain = args[1] or Syntax() local password = args[2] or Syntax() -local privatekey = k.toKristWalletFormat(password) +local privatekey = args[3] and args[2] or k.toKristWalletFormat(password) local address = k.makev2address(privatekey) local transactions = Util.readTable('/usr/swshop.log') or { }