Skip to content

Commit

Permalink
Merge pull request cypherstack#931 from cypherstack/staging
Browse files Browse the repository at this point in the history
Update to 2.1.2
  • Loading branch information
rehrar authored Jul 10, 2024
2 parents cec219f + aeb7de8 commit 9c37f99
Show file tree
Hide file tree
Showing 135 changed files with 5,129 additions and 1,365 deletions.
Binary file modified asset_sources/default_themes/campfire/light.zip
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions asset_sources/svg/campfire/exchange_icons/nanswap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions asset_sources/svg/stack_duo/exchange_icons/nanswap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions asset_sources/svg/stack_wallet/exchange_icons/nanswap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,22 @@ cd ..
or manually by creating the files referenced in that script with the specified content.

### Build plugins
#### Build script: `build_app.sh`
The `build_app.sh` script is use to build applications Stack Wallet. View the script's help message with `./build_app.sh -h` for more information on its usage.

Options:

- `a <app>`: Specify the application ID (required). Valid options are `stack_wallet` or `stack_duo`.
- `b <build_number>`: Specify the build number in 123 (required).
- `p <platform>`: Specify the platform to build for (required). Valid options are `android`, `ios`, `macos`, `linux`, or `windows`.
- `v <version>`: Specify the version of the application in 1.2.3 format (required).
- `i`: Optional flag to skip building crypto plugins. Useful for updating `pubspec.yaml` and white-labelling different apps with the same plugins.

For example,
```
./build_app.sh -a stack_wallet -p linux -v 2.1.0 -b 210
```

#### Building plugins for Android
> Warning: This will take a long time, please be patient
```
Expand Down
3 changes: 3 additions & 0 deletions ios/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ Runner/GeneratedPluginRegistrant.*
!default.mode2v3
!default.pbxuser
!default.perspectivev3

# app specific, handled by scripts
Runner/Assets.xcassets/LaunchImage.imageset/*.png
2 changes: 2 additions & 0 deletions lib/app_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ abstract class AppConfig {
static const prefix = _prefix;
static const suffix = _suffix;

static const emptyWalletsMessage = _emptyWalletsMessage;

static String get appDefaultDataDirName => _appDataDirName;
static String get shortDescriptionText => _shortDescriptionText;
static String get commitHash => _commitHash;
Expand Down
21 changes: 21 additions & 0 deletions lib/models/keys/cw_key_data.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import 'key_data_interface.dart';

class CWKeyData with KeyDataInterface {
CWKeyData({
required this.walletId,
required String? privateSpendKey,
required String? privateViewKey,
required String? publicSpendKey,
required String? publicViewKey,
}) : keys = List.unmodifiable([
(label: "Public View Key", key: publicViewKey),
(label: "Private View Key", key: privateViewKey),
(label: "Public Spend Key", key: publicSpendKey),
(label: "Private Spend Key", key: privateSpendKey),
]);

@override
final String walletId;

final List<({String label, String key})> keys;
}
3 changes: 3 additions & 0 deletions lib/models/keys/key_data_interface.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mixin KeyDataInterface {
String get walletId;
}
17 changes: 17 additions & 0 deletions lib/models/keys/xpriv_data.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import '../../wallets/wallet/wallet_mixin_interfaces/extended_keys_interface.dart';
import 'key_data_interface.dart';

class XPrivData with KeyDataInterface {
XPrivData({
required this.walletId,
required this.fingerprint,
required List<XPriv> xprivs,
}) : xprivs = List.unmodifiable(xprivs);

@override
final String walletId;

final String fingerprint;

final List<XPriv> xprivs;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

import '../../../../../app_config.dart';
import '../../../../../frost_route_generator.dart';
import '../../../../../notifications/show_flush_bar.dart';
import '../../../../../pages_desktop_specific/desktop_home_view.dart';
Expand Down Expand Up @@ -45,7 +46,7 @@ class _FrostCreateStep5State extends ConsumerState<FrostCreateStep5> {
static const _warning = "These are your private keys. Please back them up, "
"keep them safe and never share it with anyone. Your private keys are the"
" only way you can access your funds if you forget PIN, lose your phone, "
"etc. Stack Wallet does not keep nor is able to restore your private keys"
"etc. ${AppConfig.prefix} does not keep nor is able to restore your private keys"
".";

late final String seed, recoveryString, serializedKeys, multisigConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:tuple/tuple.dart';

import '../../../app_config.dart';
import '../../../pages_desktop_specific/my_stack_view/exit_to_my_stack_button.dart';
import '../../../providers/db/main_db_provider.dart';
import '../../../providers/global/secure_store_provider.dart';
Expand Down Expand Up @@ -173,7 +174,7 @@ class _NewWalletRecoveryPhraseWarningViewState
"write it down. Keep it safe and never share it with "
"anyone. Your recovery phrase is the only way you can"
" access your funds if you forget your PIN, lose your"
" phone, etc.\n\nStack Wallet does not keep nor is "
" phone, etc.\n\n${AppConfig.appName} does not keep nor is "
"able to restore your recover phrase. Only you have "
"access to your wallet.",
style: isDesktop
Expand Down Expand Up @@ -427,7 +428,7 @@ class _NewWalletRecoveryPhraseWarningViewState
),
Flexible(
child: Text(
"I understand that Stack Wallet does not keep and cannot restore my recovery phrase, and If I lose my recovery phrase, I will not be able to access my funds.",
"I understand that ${AppConfig.appName} does not keep and cannot restore my recovery phrase, and If I lose my recovery phrase, I will not be able to access my funds.",
style: isDesktop
? STextStyles.desktopTextMedium(
context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,17 +405,19 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
color: Colors.transparent,
child: Column(
children: [
CheckboxTextButton(
label: "Scan for Lelantus transactions",
onChanged: (newValue) {
setState(() {
enableLelantusScanning = newValue ?? true;
});
},
),
const SizedBox(
height: 8,
),
if (coin is Firo)
CheckboxTextButton(
label: "Scan for Lelantus transactions",
onChanged: (newValue) {
setState(() {
enableLelantusScanning = newValue ?? true;
});
},
),
if (coin is Firo)
const SizedBox(
height: 8,
),
ClipRRect(
borderRadius: BorderRadius.circular(
Constants.size.circularBorderRadius,
Expand Down Expand Up @@ -500,6 +502,9 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
),
),
),
const SizedBox(
height: 16,
),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/buy_view/buy_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ class _BuyFormState extends ConsumerState<BuyForm> {
),
if (AppConfig.isStackCoin(selectedCrypto?.ticker))
CustomTextButton(
text: "Choose from Stack",
text: "Choose from ${AppConfig.prefix}",
onTap: () {
try {
final coin = AppConfig.getCryptoCurrencyForTicker(
Expand Down
Loading

0 comments on commit 9c37f99

Please sign in to comment.