Skip to content

Commit

Permalink
Merge pull request #19 from LedgerHQ/develop
Browse files Browse the repository at this point in the history
merge develop branch into master (B2CA-1622)
  • Loading branch information
tdejoigny-ledger authored May 30, 2024
2 parents ac1b362 + 9f50540 commit 724e664
Show file tree
Hide file tree
Showing 725 changed files with 210 additions and 160 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@ name: Compilation & tests
on: [workflow_dispatch, push, pull_request]

jobs:
build_application:
name: Build application using the reusable workflow
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1
with:
upload_app_binaries_artifact: "compiled_app_binaries"

job_nanoS_build_debug:
name: Build debug app for NanoS
runs-on: ubuntu-latest

container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:d5bfe2e793f15a826971ae9de2adcad524df3e8e
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:3.19.0

steps:
- name: Clone
Expand All @@ -29,7 +35,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:d5bfe2e793f15a826971ae9de2adcad524df3e8e
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:3.19.0

steps:
- name: Clone
Expand All @@ -50,7 +56,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:d5bfe2e793f15a826971ae9de2adcad524df3e8e
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:3.19.0

steps:
- name: Clone
Expand All @@ -72,7 +78,7 @@ jobs:
needs: job_nanoS_build_debug

container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:d5bfe2e793f15a826971ae9de2adcad524df3e8e
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:3.19.0

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/guidelines_enforcer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ jobs:
guidelines_enforcer:
name: Call Ledger guidelines_enforcer
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_guidelines_enforcer.yml@v1
with:
run_for_devices: '["nanos", "nanox", "nanosp"]'
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

APPVERSION_M = 1
APPVERSION_N = 0
APPVERSION_P = 6
APPVERSION_P = 7

NANOS_ID = 1
WORDS = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"
Expand Down
2 changes: 1 addition & 1 deletion MakefileContainer.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ifneq ($(BOLOS_SDK),)
$(error Containerized build, BOLOS_SDK should be empty)
endif

APP_BUILDER_IMAGE = ledger-app-builder:d5bfe2e793f15a826971ae9de2adcad524df3e8e
APP_BUILDER_IMAGE = ledger-app-builder:3.19.0

default_target: build

Expand Down
2 changes: 1 addition & 1 deletion MakefileLocal.mk
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ endif
# Build #
##############

build: bin/app.elf
build: all
@cp $(DBG_DIR)/app.asm debug/app.asm
@cp $(DBG_DIR)/app.map debug/app.map
@cp $(BIN_DIR)/app.hex bin/app.hex
Expand Down
2 changes: 1 addition & 1 deletion MakefileSpeculos.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.
#*******************************************************************************

SPECULOS_IMAGE = speculos:sha-6a34680
SPECULOS_IMAGE = speculos:6409e73ba640fbec2e46dfae7ae0f18887a7ee42

define run_announce
@perl -e 'use Time::HiRes; use POSIX; $$ts = sprintf qq[%f], Time::HiRes::time(); ($$f) = $$ts =~ m~(\....)~; printf qq[%s%s %s make: %s\n], POSIX::strftime("%H:%M:%S", gmtime), $$f, q[-] x 126, $$ARGV[0];' "$(1)"
Expand Down
36 changes: 17 additions & 19 deletions ledgerjs-fio/src/interactions/transactionTemplates/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,30 +413,28 @@ export function ADD_STORAGE_CHECK(check: VALUE_STORAGE_COMPARE, c: Command): Com
}
}

export function COMMAND_APPEND_DATA_MEMO_HASH(memo?: VarlenAsciiString, hash?: VarlenAsciiString, offline_url?: VarlenAsciiString): Command {
var varData: Buffer = Buffer.from("");
if (memo === undefined) {
validate(hash !== undefined, InvalidDataReason.INVALID_HASH);
validate(offline_url !== undefined, InvalidDataReason.INVALID_OFFLINE_URL);
varData = Buffer.concat([
Buffer.from("0001", "hex"),
varuint32_to_buf(hash.length),
Buffer.from(hash),
Buffer.from("01", "hex"),
varuint32_to_buf(offline_url.length),
Buffer.from(offline_url),
])
function serializeOptionalString(str?: VarlenAsciiString): Buffer {
if (str === undefined) {
return Buffer.from("00", "hex")
}
else {
validate(hash === undefined, InvalidDataReason.INVALID_HASH);
validate(hash === undefined, InvalidDataReason.INVALID_OFFLINE_URL);
varData = Buffer.concat([
return Buffer.concat([
Buffer.from("01", "hex"),
varuint32_to_buf(memo.length),
Buffer.from(memo),
Buffer.from("0000", "hex"),
varuint32_to_buf(str.length),
Buffer.from(str),
])
}
}

export function COMMAND_APPEND_DATA_MEMO_HASH(memo?: VarlenAsciiString, hash?: VarlenAsciiString, offline_url?: VarlenAsciiString): Command {
validate((hash !== undefined && offline_url !== undefined) || (hash === undefined && offline_url === undefined), InvalidDataReason.INVALID_HASH);

const varData = Buffer.concat([
serializeOptionalString(memo),
serializeOptionalString(hash),
serializeOptionalString(offline_url),
])

return {
...defaultCommand,
command: COMMAND.APPEND_DATA,
Expand Down
Loading

0 comments on commit 724e664

Please sign in to comment.