Skip to content

Commit

Permalink
Merge pull request #33 from xtruan/develop
Browse files Browse the repository at this point in the history
Updates for new FW
  • Loading branch information
xtruan authored May 20, 2024
2 parents 1fa9193 + a9b4ead commit 1c5b502
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- develop

env:
firmware_version: '0.88.0'
firmware_version: '0.101.2'

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'v[0-9]+.[0-9]+.[0-9]+'

env:
firmware_version: '0.88.0'
firmware_version: '0.101.2'

jobs:
build:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ufbt_build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "FAP: Build for multiple SDK sources"
name: "uFBT Build"
on:
push:
branches:
Expand Down Expand Up @@ -32,4 +32,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-${{ steps.build-app.outputs.suffix }}
path: ${{ steps.build-app.outputs.fap-artifacts }}
path: ${{ steps.build-app.outputs.fap-artifacts }}
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
[![Build](https://github.com/xtruan/FlipBIP/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/xtruan/FlipBIP/actions/workflows/build.yml)

## Crypto toolkit for Flipper Zero
- Last built against `0.88.0` Flipper Zero firmware release
- Last built against `0.101.2` Flipper Zero firmware release
- Using Trezor crypto libs from `core/v2.5.3` release
- Included in [RogueMaster Custom Firmware](https://github.com/RogueMaster/flipperzero-firmware-wPlugins)
- NOTE: This app uses very close to the maximum Flipper Zero RAM. If you get `furi_check failed` on launch, try running again!

### DONATE IF YOU FIND THE APP USEFUL
Expand Down Expand Up @@ -63,7 +62,7 @@ The application will be compiled and copied onto your device
- Addresses are now generated at the same time as other pieces of wallet info
- This slows down initial wallet load, but makes UI much more responsive
- QR code files are now generated for each address and stored in the `apps_data/flipbip` directory
- This app is required to view the QR code files: https://github.com/bmatcuk/flipperzero-qrcode (included in RM firmware)
- This app is required to view the QR code files: https://github.com/bmatcuk/flipperzero-qrcode
- NOTE: This happens during the `View Wallet` step; you must view a wallet after generating/importing a wallet in order to ensure the address QR files are correct
- Broke out crypto functionality into its own library using `fap_private_libs` feature

Expand Down
2 changes: 1 addition & 1 deletion application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ App(
fap_category="Tools",
fap_author="Struan Clark (xtruan)",
fap_weburl="https://github.com/xtruan/FlipBIP",
fap_version=(1, 14),
fap_version=(1, 15),
fap_description="Crypto wallet for Flipper",
)
6 changes: 3 additions & 3 deletions flipbip.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ static void flipbip_scene_renew_dialog_callback(DialogExResult result, void* con
static void flipbip_wallet_create(void* context) {
FlipBip* app = context;
furi_assert(app);
scene_manager_set_scene_state(
app->scene_manager, FlipBipSceneMenu, SubmenuIndexScene1New);
scene_manager_set_scene_state(app->scene_manager, FlipBipSceneMenu, SubmenuIndexScene1New);
scene_manager_next_scene(app->scene_manager, FlipBipSceneScene_1);
}

Expand Down Expand Up @@ -171,7 +170,8 @@ FlipBip* flipbip_app_alloc() {
dialog_ex_set_context(app->renew_dialog, app);
dialog_ex_set_left_button_text(app->renew_dialog, "No");
dialog_ex_set_right_button_text(app->renew_dialog, "Yes");
dialog_ex_set_header(app->renew_dialog, "Current wallet\nWill be lost.\nProceed?", 16, 12, AlignLeft, AlignTop);
dialog_ex_set_header(
app->renew_dialog, "Current wallet\nWill be lost.\nProceed?", 16, 12, AlignLeft, AlignTop);
view_dispatcher_add_view(
app->view_dispatcher, FlipBipViewRenewConfirm, dialog_ex_get_view(app->renew_dialog));

Expand Down
6 changes: 2 additions & 4 deletions flipbip.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "scenes/flipbip_scene.h"
#include "views/flipbip_scene_1.h"

#define FLIPBIP_VERSION "v1.14"
#define FLIPBIP_VERSION "v1.15"

#define COIN_BTC 0
#define COIN_DOGE 3
Expand All @@ -24,8 +24,6 @@

#define TEXT_BUFFER_SIZE 256



typedef struct {
Gui* gui;
// NotificationApp* notification;
Expand All @@ -50,7 +48,7 @@ typedef struct {
char import_mnemonic_text[TEXT_BUFFER_SIZE];
char input_text[TEXT_BUFFER_SIZE];

void (* wallet_create)(void* context);
void (*wallet_create)(void* context);
} FlipBip;

typedef enum {
Expand Down
6 changes: 3 additions & 3 deletions helpers/flipbip_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ bool flipbip_load_file(
const char* file_name) {
bool ret = false;
const char* path;
char path_buf[FILE_MAX_PATH_LEN] = {0};
if(file_type == FlipBipFileKey) {
path = FLIPBIP_KEY_PATH;
} else if(file_type == FlipBipFileDat) {
path = FLIPBIP_DAT_PATH;
} else {
char path_buf[FILE_MAX_PATH_LEN] = {0};
strcpy(path_buf, FLIPBIP_APP_BASE_FOLDER); // 22
strcpy(path_buf + strlen(path_buf), "/");
strcpy(path_buf + strlen(path_buf), file_name);
Expand Down Expand Up @@ -96,12 +96,12 @@ bool flipbip_load_file(
bool flipbip_has_file(const FlipBipFile file_type, const char* file_name, const bool remove) {
bool ret = false;
const char* path;
char path_buf[FILE_MAX_PATH_LEN] = {0};
if(file_type == FlipBipFileKey) {
path = FLIPBIP_KEY_PATH;
} else if(file_type == FlipBipFileDat) {
path = FLIPBIP_DAT_PATH;
} else {
char path_buf[FILE_MAX_PATH_LEN] = {0};
strcpy(path_buf, FLIPBIP_APP_BASE_FOLDER); // 22
strcpy(path_buf + strlen(path_buf), "/");
strcpy(path_buf + strlen(path_buf), file_name);
Expand All @@ -127,14 +127,14 @@ bool flipbip_save_file(
bool ret = false;
const char* path;
const char* path_bak;
char path_buf[FILE_MAX_PATH_LEN] = {0};
if(file_type == FlipBipFileKey) {
path = FLIPBIP_KEY_PATH;
path_bak = FLIPBIP_KEY_PATH_BAK;
} else if(file_type == FlipBipFileDat) {
path = FLIPBIP_DAT_PATH;
path_bak = FLIPBIP_DAT_PATH_BAK;
} else {
char path_buf[FILE_MAX_PATH_LEN] = {0};
strcpy(path_buf, FLIPBIP_APP_BASE_FOLDER); // 22
strcpy(path_buf + strlen(path_buf), "/");
strcpy(path_buf + strlen(path_buf), file_name);
Expand Down
2 changes: 1 addition & 1 deletion lib/crypto/base32.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ char* base32_encode(
int ret = base32_encode_character(out[i], alphabet);

if(ret == -1) {
return false;
return NULL;
} else {
out[i] = ret;
}
Expand Down

0 comments on commit 1c5b502

Please sign in to comment.