Skip to content

Commit

Permalink
feat: bump app version + bump zxlib (#7)
Browse files Browse the repository at this point in the history
* feat: bump app version

* feat: update snapshots

* chore: bump zxlib version

* chore: update snapshots

* chore: workaround to toggle blind signing on zemu tests
  • Loading branch information
emmanuelm41 authored Oct 30, 2024
1 parent 2fe2a23 commit 6b478dc
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 9 deletions.
4 changes: 2 additions & 2 deletions app/Makefile.version
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is the major version
APPVERSION_M=0
APPVERSION_M=1
# This is the minor version
APPVERSION_N=0
# This is the patch version
APPVERSION_P=5
APPVERSION_P=0
2 changes: 1 addition & 1 deletion deps/ledger-zxlib
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/s-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/s-mainmenu/00009.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/sp-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/sp-mainmenu/00009.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/st-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/st-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/st-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/st-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/x-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/x-mainmenu/00009.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 12 additions & 3 deletions tests_zemu/tests/legacy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
******************************************************************************* */

import Zemu, { ButtonKind, isTouchDevice } from '@zondax/zemu'
import Zemu, {ButtonKind, isTouchDevice, TouchNavigation} from '@zondax/zemu'
import Kda from '@zondax/hw-app-kda'
import { PATH, defaultOptions, models } from './common'
import { blake2bFinal, blake2bInit, blake2bUpdate } from 'blakejs'
Expand Down Expand Up @@ -179,8 +179,17 @@ describe.each(HASH_TEST_CASES)('Hash transactions', function (data) {

const { publicKey } = await app.getPublicKey(data.path)

// Enable blind signing mode
await sim.toggleBlindSigning()
// Enable blind signing mode (this need to be fixed on zemu, as the current fn is not working anymore)
if(isTouchDevice(m.name)){
const nav = new TouchNavigation(m.name, [
ButtonKind.InfoButton,
ButtonKind.ToggleSettingButton3,
ButtonKind.SettingsQuitButton,
]);
await sim.navigate(".", `${m.prefix.toLowerCase()}-sign_${data.name}_legacy`, nav.schedule, true, false, 0)
} else {
await sim.toggleBlindSigning()
}

// do not wait here... we need to navigate
const signatureRequest = app.signHash(data.path, data.hash)
Expand Down
15 changes: 12 additions & 3 deletions tests_zemu/tests/transactions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
******************************************************************************* */

import Zemu from '@zondax/zemu'
import Zemu, {ButtonKind, isTouchDevice, TouchNavigation} from '@zondax/zemu'
import { KadenaApp, TransferTxType, TransferCrossChainTxParams } from '@zondax/ledger-kadena'
import { PATH, defaultOptions, models } from './common'
import { blake2bFinal, blake2bInit, blake2bUpdate } from 'blakejs'
Expand Down Expand Up @@ -72,8 +72,17 @@ describe.each(HASH_TEST_CASES)('Hash transactions', function (data) {
const responseAddr = await app.getAddressAndPubKey(data.path)
const pubKey = responseAddr.pubkey

// Enable blind signing mode
await sim.toggleBlindSigning()
// Enable blind signing mode (this need to be fixed on zemu, as the current fn is not working anymore)
if(isTouchDevice(m.name)){
const nav = new TouchNavigation(m.name, [
ButtonKind.InfoButton,
ButtonKind.ToggleSettingButton3,
ButtonKind.SettingsQuitButton,
]);
await sim.navigate(".", `${m.prefix.toLowerCase()}-sign_${data.name}`, nav.schedule, true, false, 0)
} else {
await sim.toggleBlindSigning()
}

// do not wait here... we need to navigate
const signatureRequest = app.signHash(data.path, data.hash)
Expand Down

0 comments on commit 6b478dc

Please sign in to comment.