Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions mytonctrl/mytonctrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def inject_globals(func):
console.AddItem("upgrade", inject_globals(Upgrade), local.translate("upgrade_cmd"))
console.AddItem("installer", inject_globals(Installer), local.translate("installer_cmd"))
console.AddItem("status", inject_globals(PrintStatus), local.translate("status_cmd"))
console.AddItem("enable_mode", inject_globals(enable_mode), local.translate("enable_mode_cmd"))
console.AddItem("disable_mode", inject_globals(disable_mode), local.translate("disable_mode_cmd"))
console.AddItem("seqno", inject_globals(Seqno), local.translate("seqno_cmd"))
console.AddItem("getconfig", inject_globals(GetConfig), local.translate("getconfig_cmd"))

Expand Down Expand Up @@ -1237,24 +1239,26 @@ def SetSettings(ton, args):
#end define


def enable_mode(ton, args):
def enable_mode(local, ton, args):
try:
name = args[0]
except:
color_print("{red}Bad args. Usage:{endc} enable_mode <mode_name>")
return
ton.enable_mode(name)
color_print("enable_mode - {green}OK{endc}")
local.exit()


def disable_mode(ton, args):
def disable_mode(local, ton, args):
try:
name = args[0]
except:
color_print("{red}Bad args. Usage:{endc} disable_mode <mode_name>")
return
ton.disable_mode(name)
color_print("disable_mode - {green}OK{endc}")
local.exit()


def Xrestart(inputArgs):
Expand Down
10 changes: 10 additions & 0 deletions mytonctrl/resources/translate.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@
"ru": "Показать статус TON",
"zh_TW": "顯示 TON 狀態"
},
"enable_mode_cmd": {
"en": "Enable mode",
"ru": "Включить режим",
"zh_TW": "啟用模式"
},
"disable_mode_cmd": {
"en": "Disable mode",
"ru": "Выключить режим",
"zh_TW": "禁用模式"
},
"seqno_cmd": {
"en": "Get seqno wallet",
"ru": "Получить seqno кошелька",
Expand Down