Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flex fixes #229

Merged
merged 3 commits into from
Jul 22, 2024
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
6 changes: 0 additions & 6 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ $(info PATHS LIST = $(APPPATH))

APP_LOAD_PARAMS = --curve ed25519 $(COMMON_LOAD_PARAMS) --path $(APPPATH)

ifeq ($(TARGET_NAME),TARGET_NANOS)
APP_STACK_MIN_SIZE := 1600
else
APP_STACK_MIN_SIZE := 1752
endif

include $(CURDIR)/../deps/ledger-zxlib/makefiles/Makefile.devices

DEFAULT_NANOS_ICON = nanos_$(ICON_NAME).gif
Expand Down
2 changes: 1 addition & 1 deletion app/Makefile.version
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ APPVERSION_M=100
# This is the `spec_version` field of `Runtime`
APPVERSION_N=0
# This is the patch version of this release
APPVERSION_P=6
APPVERSION_P=7
Binary file modified app/flex_migration.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion deps/ledger-zxlib
2 changes: 1 addition & 1 deletion ledger_app.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[app]
build_directory = "./app/"
sdk = "C"
devices = ["nanos", "nanox", "nanos+", "stax"]
devices = ["nanos", "nanox", "nanos+", "stax", "flex"]

[tests]
unit_directory = "./tests/"
10 changes: 5 additions & 5 deletions tests_zemu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"dependencies": {
"@zondax/ledger-js": "^0.10.0",
"@zondax/ledger-substrate": "^0.44.3",
"@zondax/zemu": "^0.50.1"
"@zondax/zemu": "^0.50.2"
},
"devDependencies": {
"@ledgerhq/hw-transport-node-hid": "^6.29.0",
Expand All @@ -37,8 +37,8 @@
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/jest": "^29.5.12",
"@types/ledgerhq__hw-transport": "^4.21.8",
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@typescript-eslint/parser": "^7.14.1",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"blakejs": "^1.2.1",
"crypto-js": "4.2.0",
"ed25519-supercop": "^2.0.1",
Expand All @@ -47,9 +47,9 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.2.0",
"eslint-plugin-promise": "^6.6.0",
"eslint-plugin-tsdoc": "^0.3.0",
"eslint-plugin-unused-imports": "^4.0.0",
"eslint-plugin-unused-imports": "^4.0.1",
"jest": "29.7.0",
"jssha": "^3.3.1",
"prettier": "^3.3.2",
Expand Down
Binary file modified tests_zemu/snapshots/fl-balances_force_transfer_rococo/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-balances_force_transfer_rococo/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-balances_force_transfer_rococo/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-balances_force_transfer_rococo/00003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-balances_force_transfer_rococo/00004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-balances_force_transfer_rococo/00005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-mainmenu/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-mainmenu/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-mainmenu/00003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-mainmenu/00004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-mainmenu/00005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-raw_sign/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-raw_sign/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-raw_sign/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-raw_sign_hex/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-raw_sign_hex/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-raw_sign_hex/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-show_address/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-show_address/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-show_address/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-show_address_reject/00000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-show_address_reject/00001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-show_address_reject/00002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/fl-show_address_reject/00003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests_zemu/snapshots/s-mainmenu/00004.png
Binary file modified tests_zemu/snapshots/s-mainmenu/00010.png
Binary file modified tests_zemu/snapshots/sp-mainmenu/00004.png
Binary file modified tests_zemu/snapshots/sp-mainmenu/00010.png
Binary file modified tests_zemu/snapshots/st-balances_force_transfer_rococo/00000.png
Binary file modified tests_zemu/snapshots/st-balances_force_transfer_rococo/00001.png
Binary file modified tests_zemu/snapshots/st-balances_force_transfer_rococo/00002.png
Binary file modified tests_zemu/snapshots/st-balances_force_transfer_rococo/00003.png
Binary file modified tests_zemu/snapshots/st-balances_force_transfer_rococo/00004.png
Binary file modified tests_zemu/snapshots/st-mainmenu/00001.png
Binary file modified tests_zemu/snapshots/st-mainmenu/00002.png
Binary file modified tests_zemu/snapshots/st-mainmenu/00003.png
Binary file modified tests_zemu/snapshots/st-mainmenu/00004.png
Binary file modified tests_zemu/snapshots/st-mainmenu/00005.png
Binary file modified tests_zemu/snapshots/st-raw_sign/00000.png
Binary file modified tests_zemu/snapshots/st-raw_sign/00001.png
Binary file modified tests_zemu/snapshots/st-raw_sign/00002.png
Binary file modified tests_zemu/snapshots/st-raw_sign_hex/00000.png
Binary file modified tests_zemu/snapshots/st-raw_sign_hex/00001.png
Binary file modified tests_zemu/snapshots/st-raw_sign_hex/00002.png
Binary file modified tests_zemu/snapshots/st-show_address/00000.png
Binary file modified tests_zemu/snapshots/st-show_address/00001.png
Binary file modified tests_zemu/snapshots/st-show_address/00002.png
Binary file modified tests_zemu/snapshots/st-show_address_reject/00000.png
Binary file modified tests_zemu/snapshots/st-show_address_reject/00001.png
Binary file modified tests_zemu/snapshots/st-show_address_reject/00002.png
Binary file modified tests_zemu/snapshots/st-show_address_reject/00003.png
Binary file modified tests_zemu/snapshots/x-mainmenu/00004.png
Binary file modified tests_zemu/snapshots/x-mainmenu/00010.png
13 changes: 9 additions & 4 deletions tests_zemu/tests/migration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ describe('Migration', function () {

await sim.start({
...defaultOptions, startText: migrationStartText, model: m.name,
approveKeyword: m.name === 'stax' ? 'frequently' : '',
approveAction: ButtonKind.ApproveTapButton,
approveKeyword: isTouchDevice(m.name) ? 'Accept' : '',
approveAction: ButtonKind.DynamicTapButton,
})

let nav = undefined;
Expand All @@ -56,8 +56,13 @@ describe('Migration', function () {
} else {
nav = new ClickNavigation([4, 0]);
}
const lastIndex = await sim.navigate('.', `${m.prefix.toLowerCase()}-migration-mainmenu`, nav.schedule);
await sim.compareSnapshots('.', `${m.prefix.toLowerCase()}-migration-mainmenu`, lastIndex)

const path = '.'
const testcaseName = `${m.prefix.toLowerCase()}-migration-mainmenu`

const lastIndex = await sim.navigate(path, testcaseName, nav.schedule);
await sim.compareSnapshots(path, testcaseName, lastIndex)
await sim.takeSnapshotAndOverwrite(path, testcaseName, lastIndex);

const app = new PolkadotGenericApp(sim.getTransport(), 'dot')

Expand Down
5 changes: 2 additions & 3 deletions tests_zemu/tests/standard.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,10 @@ describe('Standard', function () {
await sim.start({
...defaultOptions,
model: m.name,
approveKeyword: isTouchDevice(m.name) ? 'Public key' : '',
approveAction: ButtonKind.ApproveTapButton,
approveKeyword: isTouchDevice(m.name) ? 'Confirm' : '',
approveAction: ButtonKind.DynamicTapButton,
})
const app = new PolkadotGenericApp(sim.getTransport(), 'dot', '')

const respRequest = app.getAddress(PATH, DOT_SS58_PREFIX, true)
// Wait until we are not in the main menu
await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot())
Expand Down
Loading