mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-23 06:48:16 +00:00
import qualified const()
This commit is contained in:
parent
c9fbac7a0b
commit
407169af01
@ -1,3 +1,4 @@
|
||||
from micropython import const
|
||||
from trezor import config
|
||||
|
||||
|
||||
@ -14,4 +15,4 @@ def set_storage(session_id, buf):
|
||||
|
||||
|
||||
def clear_storage(session_id):
|
||||
set_storage(session_id, '')
|
||||
set_storage(session_id, b'')
|
||||
|
@ -1,3 +1,4 @@
|
||||
from micropython import const
|
||||
from trezor import wire, ui
|
||||
from trezor.utils import unimport, chunks
|
||||
|
||||
|
@ -10,6 +10,8 @@ Value format: ((field_type, field_flags, field_name), field_value)
|
||||
field_value: Depends on field_type. EmbeddedMessage has `field_value == None`.
|
||||
'''
|
||||
|
||||
from micropython import const
|
||||
|
||||
|
||||
def build_protobuf_message(message_type, callback, *args):
|
||||
message = message_type()
|
||||
|
@ -1,3 +1,5 @@
|
||||
from micropython import const
|
||||
|
||||
if not __debug__:
|
||||
raise ImportError('This module can be loaded only in DEBUG mode')
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
from micropython import const
|
||||
import uio
|
||||
import sys
|
||||
import utime
|
||||
|
@ -1,5 +1,5 @@
|
||||
import utime
|
||||
|
||||
from micropython import const
|
||||
from uheapq import heappop, heappush, heapify
|
||||
from .utils import type_gen
|
||||
from . import msg
|
||||
|
@ -1,5 +1,6 @@
|
||||
from . import display, in_area, rotate_coords
|
||||
from micropython import const
|
||||
from trezor import ui, loop
|
||||
from . import display, in_area, rotate_coords
|
||||
|
||||
|
||||
DEFAULT_BUTTON = {
|
||||
|
@ -1,8 +1,9 @@
|
||||
from micropython import const
|
||||
from trezor import loop
|
||||
from .button import Button, BTN_CLICKED, BTN_STARTED
|
||||
from .button import CONFIRM_BUTTON, CONFIRM_BUTTON_ACTIVE
|
||||
from .button import CANCEL_BUTTON, CANCEL_BUTTON_ACTIVE
|
||||
from .loader import Loader
|
||||
from trezor import loop
|
||||
|
||||
|
||||
CONFIRMED = const(1)
|
||||
|
@ -1,4 +1,5 @@
|
||||
import utime
|
||||
from micropython import const
|
||||
from trezor import ui
|
||||
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
from . import display
|
||||
from .button import Button, BTN_CLICKED, CLEAR_BUTTON, CLEAR_BUTTON_ACTIVE
|
||||
from trezor import ui, res
|
||||
from micropython import const
|
||||
from trezor.crypto import random
|
||||
from trezor import ui, res
|
||||
from .button import Button, BTN_CLICKED, CLEAR_BUTTON, CLEAR_BUTTON_ACTIVE
|
||||
from . import display
|
||||
|
||||
|
||||
def digit_area(i):
|
||||
|
@ -1,5 +1,6 @@
|
||||
from .swipe import Swipe, SWIPE_UP, SWIPE_DOWN
|
||||
from micropython import const
|
||||
from trezor import loop, ui
|
||||
from .swipe import Swipe, SWIPE_UP, SWIPE_DOWN
|
||||
|
||||
|
||||
async def change_page(page, page_count):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import utime
|
||||
|
||||
from . import in_area, rotate_coords
|
||||
from micropython import const
|
||||
from trezor import loop
|
||||
from . import in_area, rotate_coords
|
||||
|
||||
|
||||
SWIPE_DISTANCE_THRESHOLD = const(20) # Min pixels in the primary direction
|
||||
|
@ -1,3 +1,4 @@
|
||||
from micropython import const
|
||||
from trezor import ui
|
||||
|
||||
TEXT_HEADER_HEIGHT = const(44)
|
||||
|
@ -1,3 +1,4 @@
|
||||
from micropython import const
|
||||
import ustruct
|
||||
import ubinascii
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
from micropython import const
|
||||
import ustruct
|
||||
|
||||
SESSION_V1 = const(0)
|
||||
|
@ -1,8 +1,6 @@
|
||||
import ubinascii
|
||||
|
||||
from trezor import msg
|
||||
from trezor import loop
|
||||
from trezor import log
|
||||
from micropython import const
|
||||
from trezor import msg, loop, log
|
||||
|
||||
_DEFAULT_IFACE = const(0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user