shop to accept private key
This commit is contained in:
@@ -33,7 +33,12 @@ local wizardPage = UI.WizardPage {
|
|||||||
shadowText = "xxxx's shop",
|
shadowText = "xxxx's shop",
|
||||||
required = false,
|
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,
|
width = 9,
|
||||||
formLabel = 'Font Size', formKey = 'textScale',
|
formLabel = 'Font Size', formKey = 'textScale',
|
||||||
nochoice = 'Small',
|
nochoice = 'Small',
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ local function startShop(node)
|
|||||||
if shopTab then
|
if shopTab then
|
||||||
multishell.terminate(shopTab)
|
multishell.terminate(shopTab)
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
-- node has been reconfigured
|
-- node has been reconfigured
|
||||||
|
|||||||
@@ -24,13 +24,13 @@ w.init(jua)
|
|||||||
k.init(jua, json, w, r)
|
k.init(jua, json, w, r)
|
||||||
|
|
||||||
local function Syntax()
|
local function Syntax()
|
||||||
error('Syntax: swshop [domain] [password]')
|
error('Syntax: swshop [domain] [password | privateKey] [isPrivateKey]')
|
||||||
end
|
end
|
||||||
|
|
||||||
local args = { ... }
|
local args = { ... }
|
||||||
local domain = args[1] or Syntax()
|
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 = args[3] and args[2] or k.toKristWalletFormat(password)
|
||||||
local address = k.makev2address(privatekey)
|
local address = k.makev2address(privatekey)
|
||||||
local transactions = Util.readTable('/usr/swshop.log') or { }
|
local transactions = Util.readTable('/usr/swshop.log') or { }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user