Преглед на файлове

Squashed 'flipbip/' changes from 69ebea1df..4ed4e31f7

4ed4e31f7 upd flipbip
800482e9f update apps
fdb62b1e2 more updates
REVERT: 69ebea1df chore: OCD fixes
REVERT: eb81693fc Merge pull request #22 from xtruan/xtruan-patch-2
REVERT: a04e991de chore: update manifest.yml
REVERT: 5026eb08e Merge pull request #21 from xtruan/dev/reduce-fap-size
REVERT: b426b69d5 chore: bump ci to 0.88.0
REVERT: 156578267 chore: spelling, move param setting
REVERT: ccf7debd5 chore: spacing
REVERT: 3d488648c chore: credit
REVERT: 7dceca60e fix: remove haptic setting, cleanup
REVERT: 26552bdaa chore: fmt
REVERT: 656c41041 chore: comments
REVERT: 49a22aace fix: text input behavior
REVERT: 39c8dfe48 fix: remove haptic, add mnemonic import status text
REVERT: 2e4023bfe fix: remove keychain icon
REVERT: 75f3c9601 chore: slight refactor of crypto lib for consistency
REVERT: b81adf675 chore: 1.13
REVERT: 1057242f8 fix: remove led
REVERT: 8cb7f0994 fix: comment fix
REVERT: 9a83d5a9d fix: remove startscreen
REVERT: 927f45dfb Merge pull request #20 from xtruan/xtruan-patch-1
REVERT: 9f2ac7a9d Update README.md
REVERT: df97f17d4 chore: 1.12 catalog
REVERT: a9057ebe5 chore: bump to 1.12
REVERT: b17449111 chore: lint
REVERT: 114d0e068 Merge pull request #19 from wh00hw/main
REVERT: 4e7ebfde0 update README
REVERT: 4bca4c8bc add ZEC t-address
REVERT: eb9f6f4a6 Create ufbt_build.yml
REVERT: de58db9da chore: catalog update
REVERT: 0073c32af fix: ufbt fix
REVERT: ef151a6a7 fix: manifest
REVERT: cb4269d2b feat: manifest
REVERT: e19ecc014 chore: add screenshots
REVERT: 0d5bc6f3e Merge pull request #17 from xtruan/develop
REVERT: ac633a4c2 fix: potential buff overflow, new version scheme, check size in CI
REVERT: 1375bc695 Merge pull request #16 from xtruan/develop
REVERT: 08f60c5ed Update release.yml
REVERT: 81828639a Merge branch 'develop'
REVERT: 6f265e767 Update release.yml
REVERT: 6961945f3 Update release.yml
REVERT: 740a2f8f8 Merge pull request #15 from xtruan/develop
REVERT: 7ab548a75 chore: readme update
REVERT: 3fc8915e4 chore: 0.86.1
REVERT: 0413ca4a4 feat: warning text, v1.0.0
REVERT: 93febf341 Update build.yml - new app name
REVERT: 62605c81a Update flipbip_scene_1.c - icons
REVERT: 320830314 Update flipbip_startscreen.c - icons
REVERT: 482dc69ab Update application.fam
REVERT: 4905a91fd Update application.fam
REVERT: e8ce29f9d update appid
REVERT: 07c2f1ed3 Merge pull request #14 from xtruan/develop
REVERT: b2597b3ee update readme
REVERT: 40541083c Merge pull request #10 from xtruan/develop
REVERT: 35209cc61 wording
REVERT: 24d185faa bumping to v0.0.9, adding specific labels to input texts
REVERT: 6e6974667 Merge pull request #9 from xtruan/develop
REVERT: 091dac3f6 update CI, define text buf size
REVERT: ed136dff3 text cleanup and fmt
REVERT: c73dc8cd1 Merge pull request #8 from xtruan/develop
REVERT: c9a9f33fe bump flipper fw version
REVERT: 73d2d96da removing cdefines, adjusting display for eth addrs
REVERT: 03f9ae6c6 #define for qr code content size
REVERT: 23e8fda54 bump version, fix 'has_file' and 'load_file' buffer size
REVERT: 9f46fc6c6 Merge branch 'develop'
REVERT: 8ca73a014 Update README.md
REVERT: e7943e34a Merge pull request #7 from xtruan/develop
REVERT: 015073275 CI updates
REVERT: 9734eacc5 modify build scripts, build only
REVERT: 535013609 adding CI
REVERT: 91831db85 adding README updates
REVERT: 68a112e9d fix address gen bug
REVERT: c93f30852 nav
REVERT: bc830bb87 clean up labels
REVERT: 2aa66d184 write QR codes for addresses to file - cleanup
REVERT: 99adebd1e write QR codes for addresses to file
REVERT: 8d2de88e6 moving qr file stuff to file class
REVERT: f8f744ed3 pregenerate addresses
REVERT: 3f93a8f4d fmt
REVERT: d9407ea6d qr gen prototype
REVERT: c9aa93266 bump version
REVERT: 47890a11e making crypto code a private lib
REVERT: 8413b8755 Merge branch 'develop'
REVERT: ad40ecc31 zero address node
REVERT: 298aebe6e Merge pull request #5 from xtruan/develop
REVERT: 2c72c2dae format
REVERT: 570c9433c memory tweaks and cleanup
REVERT: 256c0b464 version bump, working mem cleanup
REVERT: c54a1a7c9 Merge pull request #4 from xtruan/develop
REVERT: b650db1d6 error handling cleanup
REVERT: 884320302 readme
REVERT: 8ac6bc8ad readme update
REVERT: 2c771e394 cleanup
REVERT: 90d001aab importing of mnemonics
REVERT: b149ebc0e text input flow cleanup
REVERT: a376ba9fa adding BIP39 passphrase
REVERT: b809efcd1 fbt format
REVERT: 7d96fafb4 cleanup menu items
REVERT: b04ca92ce refactor text
REVERT: 84d40afb4 clean up coin support
REVERT: 5b8263b04 simplifying hex conversion, adding DOGE support!
REVERT: 0c697a045 Merge branch 'develop'
REVERT: 37141444b formatting updates
REVERT: f73ef9e3a add link to RM, add donate links
REVERT: 531b0ebac typo
REVERT: 0f3fa9452 crypto Makefile changes
REVERT: 642455f3d Merge pull request #3 from xtruan/develop
REVERT: 8957be9c8 readme
REVERT: 3ccdbb3c0 Merge branch 'main' into develop
REVERT: e85117bd3 touch ups
REVERT: d02d21a87 meta update
REVERT: 66ddf24aa cleanup
REVERT: 934470360 fmt changes
REVERT: 57986fd46 running flipper fmt
REVERT: f3280c2e9 prod file names, updated docs
REVERT: ce98b7ec4 storage final cleanup
REVERT: 0db90fa48 memory
REVERT: ab400263c new wallet generation ability
REVERT: 1a7b0db77 overwrite boolean
REVERT: 5d626b853 seperate menu items for coin instead of preference, remove scene_2
REVERT: f13399689 cleanup flow
REVERT: 2de932638 return
REVERT: aa7e2869a file operations cleanup
REVERT: 473cdf712 better keys
REVERT: 410fe7849 securing storage
REVERT: ce8afc6c9 storage proof of concept
REVERT: 5aa637975 file
REVERT: 7507a66ba Merge branch 'develop' into storage
REVERT: 1424655c4 cleanup naming/types
REVERT: 844569e79 removing printf, replacing with simple itox
REVERT: de105644b storage stubs
REVERT: 87cf393f4 Update README.md
REVERT: 39255571b Merge pull request #1 from xtruan/develop
REVERT: 4ea47f6e0 update readme
REVERT: 553b8f376 message cleanup
REVERT: 95455c3ae eth compatibility!
REVERT: a978a3761 move eth address hashing to heap
REVERT: f34fba702 adding magic number comments
REVERT: 820aaa5e4 disabling KECCAK and NEM
REVERT: 6857f79bb update app metadata
REVERT: c1ca00a33 readme updates
REVERT: 69d91ff61 info cleanup
REVERT: 9d91c5179 cleanup
REVERT: 03d190a97 readme update 2
REVERT: fa69b782b readme update
REVERT: bb6db8db7 cleanup
REVERT: 360200476 changelog update
REVERT: 8ea4843e1 functional!
REVERT: 7bb88e945 break out mnemo draw
REVERT: 602c987f0 scene cleanup
REVERT: e10c1299c removing speaker, printf
REVERT: 0ebd89ee5 BTC wallet gen core logic working
REVERT: a4ad87bd5 -printf
REVERT: 804e0f112 itoa
REVERT: ea660ebe0 turn off options to shrink binary size
REVERT: e3f289dec naming
REVERT: a35dd8c6f remove scene2
REVERT: 70599120a delete coins pkg, clean up xmr
REVERT: 81b9e2035 flipbip39 > flipbip
REVERT: 9e5323891 fix BIP44 derivation
REVERT: 78842e3a2 updating deriv
REVERT: 13d5204e5 updating deriv
REVERT: 97e3bd25d working on HDNode
REVERT: 5f7063df4 turn of precomputed curves for memory
REVERT: aba3de465 BIP39 seed generation working readme
REVERT: 7c5daaa4a BIP39 seed generation working
REVERT: c681b3b4d sprintf
REVERT: bb4832a65 adding custom printf
REVERT: 0a2c30545 proto
REVERT: 81d07317a adding own impl of strtok to fix warnings
REVERT: a7cfb8c60 Update README.md
REVERT: d8ad4bdbe Update README.md
REVERT: 2a09d28f4 reorganizing code, marking WIP seed code
REVERT: 0443a1e11 updating to add beginnings of key generation
REVERT: f2934bae7 add support for 18 words
REVERT: b47b6ab85 update naming, adding coin prototyping, adding WIP BIP32 code
REVERT: 1166f2b35 better ui
REVERT: 37d0e385a icon
REVERT: deb57aa5c updating crypto/rand to use Flipper Zero specific hardware RNG
REVERT: 66192226a clean up settings, clear mnemonic memory on scene exit
REVERT: e924a4517 updating settings, UI cleanup
REVERT: f889441cd port to work with flipper and fbt
REVERT: b3236278d adding trezor crypto lib
REVERT: c0a493a94 boilerplate
REVERT: 5674a3bcc Initial commit

git-subtree-dir: flipbip
git-subtree-split: 4ed4e31f7872d18aa94335a41c2bb2f12d6654a0
Willy-JL преди 2 години
родител
ревизия
29a7592168

+ 0 - 32
.github/workflows/build.yml

@@ -1,32 +0,0 @@
-name: Build
-
-on:
-  push:
-    branches:
-      - main
-      - develop
-
-env:
-  firmware_version: '0.88.0'
-
-jobs:
-  build:
-    name: Build
-    runs-on: ubuntu-latest
-    steps:
-      - name: Checkout Flipper Zero Firmware
-        uses: actions/checkout@v3
-        with:
-          repository: 'flipperdevices/flipperzero-firmware'
-          ref: ${{ env.firmware_version }}
-          submodules: true
-      - name: Checkout FlipBIP
-        uses: actions/checkout@v3
-        with:
-          path: 'applications_user/FlipBIP'
-      - name: Build FAPs
-        run: ./fbt COMPACT=1 DEBUG=0 faps
-      - name: Check FlipBIP Built
-        run: test -f build/f7-firmware-C/.extapps/flipbip.fap
-      - name: Check FlipBIP Size
-        run: ls -l --block-size=K build/f7-firmware-C/.extapps/flipbip.fap

+ 0 - 44
.github/workflows/release.yml

@@ -1,44 +0,0 @@
-name: Release
-
-on:
-  push:
-    tags:
-      - 'v[0-9]+.[0-9]+.[0-9]+'
-
-env:
-  firmware_version: '0.88.0'
-
-jobs:
-  build:
-    name: Build
-    runs-on: ubuntu-latest
-    steps:
-      - name: Checkout Flipper Zero Firmware
-        uses: actions/checkout@v3
-        with:
-          repository: 'flipperdevices/flipperzero-firmware'
-          ref: ${{ env.firmware_version }}
-          submodules: true
-      - name: Checkout FlipBIP
-        uses: actions/checkout@v3
-        with:
-          path: 'applications_user/FlipBIP'
-      - name: Build FAPs
-        run: ./fbt COMPACT=1 DEBUG=0 faps
-      - name: Check FlipBIP Built
-        run: test -f build/f7-firmware-C/.extapps/flipbip.fap
-      - name: Get Tag
-        id: tag
-        uses: dawidd6/action-get-tag@v1
-        with:
-          strip_v: false
-      - name: Publish FlipBIP
-        uses: softprops/action-gh-release@v1
-        with:
-          files: |
-            build/f7-firmware-C/.extapps/flipbip.fap
-            applications_user/FlipBIP/README.md
-          name: ${{steps.tag.outputs.tag}}
-          body: Built against Flipper Zero firmware v${{ env.firmware_version }}
-          generate_release_notes: true
-          fail_on_unmatched_files: true

+ 0 - 35
.github/workflows/ufbt_build.yml

@@ -1,35 +0,0 @@
-name: "FAP: Build for multiple SDK sources"
-on:
-  push:
-    branches: 
-      - main
-      - develop
-  pull_request:
-  # schedule: 
-    # do a build every day
-    # - cron: "1 1 * * *"
-jobs:
-  ufbt-build-action:
-    runs-on: ubuntu-latest
-    strategy:
-      matrix:
-        include:
-          - name: dev channel
-            sdk-channel: dev
-          - name: release channel
-            sdk-channel: release
-    name: 'ufbt: Build for ${{ matrix.name }}'
-    steps:
-      - name: Checkout
-        uses: actions/checkout@v3
-      - name: Build with ufbt
-        uses: flipperdevices/flipperzero-ufbt-action@v0.1.2
-        id: build-app
-        with:
-          sdk-channel: ${{ matrix.sdk-channel }}
-          sdk-index-url: ${{ matrix.sdk-index-url }}
-      - name: Upload app artifacts
-        uses: actions/upload-artifact@v3
-        with:
-          name: ${{ github.event.repository.name }}-${{ steps.build-app.outputs.suffix }}
-          path: ${{ steps.build-app.outputs.fap-artifacts }}

+ 3 - 24
README.md

@@ -1,35 +1,14 @@
 # FlipBIP - BIP32/39/44
 # FlipBIP - BIP32/39/44
 
 
-[![Build](https://github.com/xtruan/FlipBIP/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/xtruan/FlipBIP/actions/workflows/build.yml)
+https://github.com/xtruan/FlipBIP
 
 
 ## Crypto toolkit for Flipper Zero
 ## Crypto toolkit for Flipper Zero
-- Last built against `0.88.0` Flipper Zero firmware release
 - Using Trezor crypto libs from `core/v2.5.3` 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
-  - ETH (or ERC-20): `xtruan.eth` or `0xa9Ad79502cdaf4F6881f3C2ef260713e5B771CE2`
-  - BTC: `16RP5Ui5QrWrVh2rR7NKAPwE5A4uFjCfbs`
 
 
 ## Background
 ## Background
 
 
 The goal of this project is to see how much crypto functionality can be brought to the Flipper Zero.
 The goal of this project is to see how much crypto functionality can be brought to the Flipper Zero.
 
 
-## How to install on Flipper Zero
-- If you do not have one, download a Flipper Zero firmware to get the `fbt` build tool
-- Plug your Flipper Zero in via USB
-- Copy the contents of this folder into the `applications_user` folder of your firmware
-- Modify the `site_scons/cc.scons` file in the Flipper Zero firmware to add the `"-Os"` flag
-
-Then run the command: 
- ```
-./fbt COMPACT=1 DEBUG=0 launch_app APPSRC=applications_user/FlipBIP
- ```
-The application will be compiled and copied onto your device
-
-## Status
-
 ### Complete
 ### Complete
 
 
 - Trezor crypto C code ported into `crypto` subfolder
 - Trezor crypto C code ported into `crypto` subfolder
@@ -53,7 +32,7 @@ The application will be compiled and copied onto your device
       - `.flipbip.dat` and `.flipbip.key` files are both required to be in `apps_data/flipbip`
       - `.flipbip.dat` and `.flipbip.key` files are both required to be in `apps_data/flipbip`
       - Backups of both these files `.flipbip.dat.bak` and `.flipbip.key.bak` are also maintained
       - Backups of both these files `.flipbip.dat.bak` and `.flipbip.key.bak` are also maintained
       - If you want to externally back up your wallet, I recommend copying all these files, and storing the `key` and `dat` files seperately
       - If you want to externally back up your wallet, I recommend copying all these files, and storing the `key` and `dat` files seperately
-  - NOTE: The wallets should be decently tough to crack off of a Flipper, however any Flipper with the app installed can load a wallet in the `apps_data/flipbip` directory if both the `key` and `dat` file are present. Therefore, it is HIGHLY RECOMMENDED to use the BIP39 passphrase functionality and store the passphrase in your brain or on paper separately from the Flipper!
+  - NOTE: The wallets should be decently tough to crack off of a Flipper, however any Flipper with the app installed can load a wallet in the `apps_data/flipbip` directory if both the `key` and `dat` file are present
 - BIP39 passphrase support
 - BIP39 passphrase support
   - Configured in settings, not persisted between runs for security
   - Configured in settings, not persisted between runs for security
 - Import your own mnemonic
 - Import your own mnemonic
@@ -63,7 +42,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
   - 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
     - 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
   - 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
     - 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
 - Broke out crypto functionality into its own library using `fap_private_libs` feature
 
 

+ 1 - 1
application.fam

@@ -17,6 +17,6 @@ App(
     fap_category="Tools",
     fap_category="Tools",
     fap_author="Struan Clark (xtruan)",
     fap_author="Struan Clark (xtruan)",
     fap_weburl="https://github.com/xtruan/FlipBIP",
     fap_weburl="https://github.com/xtruan/FlipBIP",
-    fap_version=(1, 13),
+    fap_version=(1, 14),
     fap_description="Crypto wallet for Flipper",
     fap_description="Crypto wallet for Flipper",
 )
 )

BIN
catalog/browser.png


BIN
catalog/btc_loading.png


BIN
catalog/btc_receive.png


BIN
catalog/eth_loading.png


BIN
catalog/eth_receive.png


BIN
catalog/input_mnemonic.png


+ 0 - 17
catalog/manifest.yml

@@ -1,17 +0,0 @@
-sourcecode:
-  type: git
-  location:
-    origin: https://github.com/xtruan/FlipBIP.git
-    commit_sha: 5026eb08e0e0d14d34bec1f5497411288bbf133f
-description: "Cryptocurrency wallet with support for BTC, ETH, DOGE, and ZEC (t-addr)"
-changelog: "v1.13.0 - Simplifying UI, reducing size"
-author: "@xtruan"
-screenshots:
-  - "./catalog/startscreen.png"
-  - "./catalog/menu1.png"
-  - "./catalog/menu2.png"
-  - "./catalog/input_mnemonic.png"
-  - "./catalog/btc_loading.png"
-  - "./catalog/wallet_info.png"
-  - "./catalog/btc_receive.png"
-  - "./catalog/settings.png"

BIN
catalog/menu1.png


BIN
catalog/menu2.png


BIN
catalog/settings.png


BIN
catalog/startscreen.png


BIN
catalog/wallet_info.png


BIN
catalog/wallet_mnemonic.png


+ 30 - 0
flipbip.c

@@ -90,6 +90,23 @@ static void text_input_callback(void* context) {
     }
     }
 }
 }
 
 
+static void flipbip_scene_renew_dialog_callback(DialogExResult result, void* context) {
+    FlipBip* app = context;
+    if(result == DialogExResultRight) {
+        app->wallet_create(app);
+    } else {
+        view_dispatcher_switch_to_view(app->view_dispatcher, FlipBipViewIdMenu);
+    }
+}
+
+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_next_scene(app->scene_manager, FlipBipSceneScene_1);
+}
+
 FlipBip* flipbip_app_alloc() {
 FlipBip* flipbip_app_alloc() {
     FlipBip* app = malloc(sizeof(FlipBip));
     FlipBip* app = malloc(sizeof(FlipBip));
     app->gui = furi_record_open(RECORD_GUI);
     app->gui = furi_record_open(RECORD_GUI);
@@ -148,6 +165,16 @@ FlipBip* flipbip_app_alloc() {
     view_dispatcher_add_view(
     view_dispatcher_add_view(
         app->view_dispatcher, FlipBipViewIdTextInput, text_input_get_view(app->text_input));
         app->view_dispatcher, FlipBipViewIdTextInput, text_input_get_view(app->text_input));
 
 
+    app->wallet_create = flipbip_wallet_create;
+    app->renew_dialog = dialog_ex_alloc();
+    dialog_ex_set_result_callback(app->renew_dialog, flipbip_scene_renew_dialog_callback);
+    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);
+    view_dispatcher_add_view(
+        app->view_dispatcher, FlipBipViewRenewConfirm, dialog_ex_get_view(app->renew_dialog));
+
     // End Scene Additions
     // End Scene Additions
 
 
     return app;
     return app;
@@ -168,6 +195,9 @@ void flipbip_app_free(FlipBip* app) {
     view_dispatcher_remove_view(app->view_dispatcher, FlipBipViewIdTextInput);
     view_dispatcher_remove_view(app->view_dispatcher, FlipBipViewIdTextInput);
     submenu_free(app->submenu);
     submenu_free(app->submenu);
 
 
+    view_dispatcher_remove_view(app->view_dispatcher, FlipBipViewRenewConfirm);
+    dialog_ex_free(app->renew_dialog);
+
     view_dispatcher_free(app->view_dispatcher);
     view_dispatcher_free(app->view_dispatcher);
     furi_record_close(RECORD_GUI);
     furi_record_close(RECORD_GUI);
 
 

+ 20 - 1
flipbip.h

@@ -9,12 +9,13 @@
 #include <gui/view_dispatcher.h>
 #include <gui/view_dispatcher.h>
 #include <gui/modules/submenu.h>
 #include <gui/modules/submenu.h>
 #include <gui/scene_manager.h>
 #include <gui/scene_manager.h>
+#include <gui/modules/dialog_ex.h>
 #include <gui/modules/variable_item_list.h>
 #include <gui/modules/variable_item_list.h>
 #include <gui/modules/text_input.h>
 #include <gui/modules/text_input.h>
 #include "scenes/flipbip_scene.h"
 #include "scenes/flipbip_scene.h"
 #include "views/flipbip_scene_1.h"
 #include "views/flipbip_scene_1.h"
 
 
-#define FLIPBIP_VERSION "v1.13"
+#define FLIPBIP_VERSION "v1.14"
 
 
 #define COIN_BTC 0
 #define COIN_BTC 0
 #define COIN_DOGE 3
 #define COIN_DOGE 3
@@ -23,6 +24,8 @@
 
 
 #define TEXT_BUFFER_SIZE 256
 #define TEXT_BUFFER_SIZE 256
 
 
+
+
 typedef struct {
 typedef struct {
     Gui* gui;
     Gui* gui;
     // NotificationApp* notification;
     // NotificationApp* notification;
@@ -31,6 +34,7 @@ typedef struct {
     SceneManager* scene_manager;
     SceneManager* scene_manager;
     VariableItemList* variable_item_list;
     VariableItemList* variable_item_list;
     TextInput* text_input;
     TextInput* text_input;
+    DialogEx* renew_dialog;
     FlipBipScene1* flipbip_scene_1;
     FlipBipScene1* flipbip_scene_1;
     char* mnemonic_menu_text;
     char* mnemonic_menu_text;
     // Settings options
     // Settings options
@@ -45,6 +49,8 @@ typedef struct {
     char passphrase_text[TEXT_BUFFER_SIZE];
     char passphrase_text[TEXT_BUFFER_SIZE];
     char import_mnemonic_text[TEXT_BUFFER_SIZE];
     char import_mnemonic_text[TEXT_BUFFER_SIZE];
     char input_text[TEXT_BUFFER_SIZE];
     char input_text[TEXT_BUFFER_SIZE];
+
+    void (* wallet_create)(void* context);
 } FlipBip;
 } FlipBip;
 
 
 typedef enum {
 typedef enum {
@@ -53,6 +59,7 @@ typedef enum {
     FlipBipViewIdScene1,
     FlipBipViewIdScene1,
     FlipBipViewIdSettings,
     FlipBipViewIdSettings,
     FlipBipViewIdTextInput,
     FlipBipViewIdTextInput,
+    FlipBipViewRenewConfirm,
 } FlipBipViewId;
 } FlipBipViewId;
 
 
 typedef enum {
 typedef enum {
@@ -86,3 +93,15 @@ typedef enum {
     FlipBipStatusSaveError = 12,
     FlipBipStatusSaveError = 12,
     FlipBipStatusMnemonicCheckError = 13,
     FlipBipStatusMnemonicCheckError = 13,
 } FlipBipStatus;
 } FlipBipStatus;
+
+typedef enum {
+    SubmenuIndexScene1BTC = 10,
+    SubmenuIndexScene1ETH,
+    SubmenuIndexScene1DOGE,
+    SubmenuIndexScene1ZEC,
+    SubmenuIndexScene1New,
+    SubmenuIndexScene1Renew,
+    SubmenuIndexScene1Import,
+    SubmenuIndexSettings,
+    SubmenuIndexNOP,
+} SubmenuIndex;

BIN
icons/Auth_62x31.png


BIN
icons/ButtonCenter_7x7.png


BIN
icons/ButtonDown_10x5.png


BIN
icons/ButtonLeftSmall_3x5.png


BIN
icons/ButtonLeft_4x7.png


BIN
icons/ButtonRightSmall_3x5.png


BIN
icons/ButtonRight_4x7.png


BIN
icons/ButtonUp_10x5.png


BIN
icons/Keychain_39x36.png


BIN
img/1.png


BIN
img/2.png


BIN
img/3.png


+ 8 - 15
scenes/flipbip_scene_menu.c

@@ -3,18 +3,8 @@
 
 
 #define FLIPBIP_SUBMENU_TEXT "** FlipBIP wallet " FLIPBIP_VERSION " **"
 #define FLIPBIP_SUBMENU_TEXT "** FlipBIP wallet " FLIPBIP_VERSION " **"
 
 
-enum SubmenuIndex {
-    SubmenuIndexScene1BTC = 10,
-    SubmenuIndexScene1ETH,
-    SubmenuIndexScene1DOGE,
-    SubmenuIndexScene1ZEC,
-    SubmenuIndexScene1New,
-    SubmenuIndexScene1Import,
-    SubmenuIndexSettings,
-    SubmenuIndexNOP,
-};
-
 void flipbip_scene_menu_submenu_callback(void* context, uint32_t index) {
 void flipbip_scene_menu_submenu_callback(void* context, uint32_t index) {
+    furi_assert(context);
     FlipBip* app = context;
     FlipBip* app = context;
     view_dispatcher_send_custom_event(app->view_dispatcher, index);
     view_dispatcher_send_custom_event(app->view_dispatcher, index);
 }
 }
@@ -59,7 +49,7 @@ void flipbip_scene_menu_on_enter(void* context) {
         submenu_add_item(
         submenu_add_item(
             app->submenu,
             app->submenu,
             "Regenerate wallet",
             "Regenerate wallet",
-            SubmenuIndexScene1New,
+            SubmenuIndexScene1Renew,
             flipbip_scene_menu_submenu_callback,
             flipbip_scene_menu_submenu_callback,
             app);
             app);
     } else {
     } else {
@@ -130,9 +120,12 @@ bool flipbip_scene_menu_on_event(void* context, SceneManagerEvent event) {
         } else if(event.event == SubmenuIndexScene1New) {
         } else if(event.event == SubmenuIndexScene1New) {
             app->overwrite_saved_seed = 1;
             app->overwrite_saved_seed = 1;
             app->import_from_mnemonic = 0;
             app->import_from_mnemonic = 0;
-            scene_manager_set_scene_state(
-                app->scene_manager, FlipBipSceneMenu, SubmenuIndexScene1New);
-            scene_manager_next_scene(app->scene_manager, FlipBipSceneScene_1);
+            app->wallet_create(app);
+            return true;
+        } else if(event.event == SubmenuIndexScene1Renew) {
+            app->overwrite_saved_seed = 1;
+            app->import_from_mnemonic = 0;
+            view_dispatcher_switch_to_view(app->view_dispatcher, FlipBipViewRenewConfirm);
             return true;
             return true;
         } else if(event.event == SubmenuIndexScene1Import) {
         } else if(event.event == SubmenuIndexScene1Import) {
             app->import_from_mnemonic = 1;
             app->import_from_mnemonic = 1;