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

WIP: CW-665 Implement AirGapped Monero Transactions #1535

Merged
merged 36 commits into from
Nov 9, 2024

Conversation

MrCyjaneK
Copy link
Collaborator

@MrCyjaneK MrCyjaneK commented Jul 16, 2024

Description

Work in progress for the airgap.

How to test

  1. Download offline wallet of choice
    1. xmruw - Unnamed Monero Wallet (project of mine, used during development)
      1. https://github.com/MrCyjaneK/unnamed_monero_wallet/releases/download/v1.0.0-RC61/app-clean_monero-release.apk
      2. on Let's start! screen click "Other options" (below "Normal Wallet" button) and select Offline Wallet
      3. you can either create a new wallet or restore existing (polyseed and legacy seeds are supported, with passphrase offsets)
      4. optional if you feel like breaking my work is a great idea you can go to 3 dot menu -> configuration -> and check showExtraOptions - it will show extra options in 3 dots menu that will allow you to generate URQRs that are not supported, cake wallet should handle all QR codes gracefully (i.e. throw error but not crash), also no matter what you scan it should work.
    2. anonero.io (tor browser required to visit link)
      1. download ANON flavor of the app, and on setup screen do not input node details, offline wallet will be created
    3. feather wallet
      1. (no idea, don't remember, please contibute)
  2. Create view-only wallet
    1. Download cake wallet from this PR (last one with CW-665 in slack, or from github artifacts)
    2. Create a view-only wallet
      1. via keys -> input only primary address, secret spend key and restore height
      2. via qr code -> generate NERO format (supported in xmruw, anonero and I think feather)
  3. Initial balance after sync may be wrong - open drawer on the right and use Export outputs to sync outputs to offline wallet, and get key images in exchange.
  4. Create transaction in cake wallet, scan the codes using the QR code scanner icon located in right upper corner (in xmruw and anonero)

Pull Request - Checklist

@MrCyjaneK MrCyjaneK marked this pull request as draft July 16, 2024 21:10
@MrCyjaneK MrCyjaneK force-pushed the CW-665-implement-air-gapped-monero-transactions branch from c53a296 to 5c105f1 Compare July 17, 2024 07:59
.github/workflows/cache_dependencies.yml Outdated Show resolved Hide resolved
lib/src/screens/exchange_trade/exchange_trade_page.dart Outdated Show resolved Hide resolved
cw_monero/lib/api/wallet.dart Outdated Show resolved Hide resolved
lib/src/screens/transaction_details/rbf_details_page.dart Outdated Show resolved Hide resolved
lib/src/widgets/setting_actions.dart Outdated Show resolved Hide resolved
cw_monero/lib/monero_wallet.dart Outdated Show resolved Hide resolved
lib/entities/qr_scanner.dart Outdated Show resolved Hide resolved
lib/entities/qr_scanner.dart Show resolved Hide resolved
lib/entities/qr_scanner.dart Show resolved Hide resolved
lib/view_model/restore/wallet_restore_from_qr_code.dart Outdated Show resolved Hide resolved
@OmarHatem28 OmarHatem28 marked this pull request as ready for review October 22, 2024 00:22
lib/src/screens/dashboard/widgets/menu_widget.dart Outdated Show resolved Hide resolved
scripts/android/pubspec_gen.sh Outdated Show resolved Hide resolved
lib/view_model/send/send_view_model.dart Outdated Show resolved Hide resolved
cw_monero/lib/monero_wallet.dart Outdated Show resolved Hide resolved
cw_monero/lib/api/transaction_history.dart Show resolved Hide resolved
lib/entities/qr_scanner.dart Outdated Show resolved Hide resolved
@MrCyjaneK
Copy link
Collaborator Author

used for what?

useUR is set when we do want to send transaction over qrcodes.

remove return Container() for non monero wallets
don't handle empty qr codes
display primary address in seed screen
@@ -843,7 +843,7 @@ Future<void> changeDefaultMoneroNode(
}
});

final newCakeWalletNode = Node(uri: newCakeWalletMoneroUri, type: WalletType.monero);
final newCakeWalletNode = Node(uri: newCakeWalletMoneroUri, type: WalletType.monero, trusted: true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like this it will be set to trusted for new installs only, can you please add it as a migration step (i.e case 42:) and change it for existing users as well

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also let's add to the restore from QR card the Cupcake option
i.e just change the description of the Scan QR code card in the restore options to be something like

Add a cold wallet or recover a paper wallet or add your read-only wallet from Cupcake

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tuxpizza if you have another idea to show cupcake here please chime in

Comment on lines 262 to 264
case 43:
await changeDefaultMoneroNode(nodes, sharedPreferences);
break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is calling this function going to make the node trusted?
like this it will only delete the node and add it back, which will still default trusted to false

make a new function that would just change the trusted boolean for our node to true

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and please resolve the conflicts and change the text of the card

@tuxpizza
Copy link
Collaborator

tuxpizza commented Nov 9, 2024

Hey can we move the "Export outputs" option in the menu to the same position that Silent Payments and MWEB settings is at?

…CW-665-implement-air-gapped-monero-transactions

# Conflicts:
#	ios/Podfile.lock
#	res/values/strings_ar.arb
#	res/values/strings_bg.arb
#	res/values/strings_cs.arb
#	res/values/strings_de.arb
#	res/values/strings_en.arb
#	res/values/strings_es.arb
#	res/values/strings_fr.arb
#	res/values/strings_ha.arb
#	res/values/strings_hi.arb
#	res/values/strings_hr.arb
#	res/values/strings_hy.arb
#	res/values/strings_id.arb
#	res/values/strings_it.arb
#	res/values/strings_ja.arb
#	res/values/strings_ko.arb
#	res/values/strings_my.arb
#	res/values/strings_nl.arb
#	res/values/strings_pl.arb
#	res/values/strings_pt.arb
#	res/values/strings_ru.arb
#	res/values/strings_th.arb
#	res/values/strings_tl.arb
#	res/values/strings_tr.arb
#	res/values/strings_uk.arb
#	res/values/strings_ur.arb
#	res/values/strings_vi.arb
#	res/values/strings_yo.arb
#	res/values/strings_zh.arb
- update locales
- fix conflicts
- move menu item
@OmarHatem28 OmarHatem28 merged commit cea3084 into main Nov 9, 2024
2 checks passed
@OmarHatem28 OmarHatem28 deleted the CW-665-implement-air-gapped-monero-transactions branch November 9, 2024 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants