|
| 1 | +#!/usr/bin/env bash |
| 2 | + |
| 3 | +set -euo pipefail |
| 4 | + |
| 5 | +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) |
| 6 | +# shellcheck disable=SC1091 |
| 7 | +source "${SCRIPT_DIR}/env.sh" |
| 8 | + |
| 9 | +APP_CONFIG_DART_FILE="${APP_PROJECT_ROOT_DIR}/lib/app_config.g.dart" |
| 10 | + |
| 11 | +if test -f "$APP_CONFIG_DART_FILE"; then |
| 12 | + echo 'ensure_test_app_config.sh: verified lib/app_config.g.dart' |
| 13 | + exit 0 |
| 14 | +fi |
| 15 | + |
| 16 | +BUILT_COMMIT_HASH="$(git -C "${APP_PROJECT_ROOT_DIR}" log -1 --pretty=format:%H 2>/dev/null || true)" |
| 17 | + |
| 18 | +cat > "$APP_CONFIG_DART_FILE" <<EOF |
| 19 | +// GENERATED CODE - DO NOT MODIFY BY HAND |
| 20 | +
|
| 21 | +part of 'app_config.dart'; |
| 22 | +
|
| 23 | +const _prefix = "Stack"; |
| 24 | +const _separator = " "; |
| 25 | +const _suffix = "Wallet"; |
| 26 | +const _emptyWalletsMessage = |
| 27 | + "You do not have any wallets yet. Start building your crypto Stack!"; |
| 28 | +const _appDataDirName = "stackwallet"; |
| 29 | +const _shortDescriptionText = "An open-source, multicoin wallet for everyone"; |
| 30 | +const _commitHash = "$BUILT_COMMIT_HASH"; |
| 31 | +
|
| 32 | +const _mwebdExeHash = ""; |
| 33 | +
|
| 34 | +const Set<AppFeature> _features = { |
| 35 | + AppFeature.themeSelection, |
| 36 | + AppFeature.buy, |
| 37 | + AppFeature.tor, |
| 38 | + AppFeature.swap |
| 39 | +}; |
| 40 | +
|
| 41 | +const ({String light, String dark})? _appIconAsset = null; |
| 42 | +
|
| 43 | +final List<CryptoCurrency> _supportedCoins = List.unmodifiable([ |
| 44 | + Bitcoin(CryptoCurrencyNetwork.main), |
| 45 | + Monero(CryptoCurrencyNetwork.main), |
| 46 | + Banano(CryptoCurrencyNetwork.main), |
| 47 | + Bitcoincash(CryptoCurrencyNetwork.main), |
| 48 | + BitcoinFrost(CryptoCurrencyNetwork.main), |
| 49 | + Cardano(CryptoCurrencyNetwork.main), |
| 50 | + Dash(CryptoCurrencyNetwork.main), |
| 51 | + Dogecoin(CryptoCurrencyNetwork.main), |
| 52 | + Ecash(CryptoCurrencyNetwork.main), |
| 53 | + Epiccash(CryptoCurrencyNetwork.main), |
| 54 | + Ethereum(CryptoCurrencyNetwork.main), |
| 55 | + Fact0rn(CryptoCurrencyNetwork.main), |
| 56 | + Firo(CryptoCurrencyNetwork.main), |
| 57 | + Litecoin(CryptoCurrencyNetwork.main), |
| 58 | + if (!Platform.isMacOS) Mimblewimblecoin(CryptoCurrencyNetwork.main), |
| 59 | + Nano(CryptoCurrencyNetwork.main), |
| 60 | + Namecoin(CryptoCurrencyNetwork.main), |
| 61 | + Particl(CryptoCurrencyNetwork.main), |
| 62 | + Peercoin(CryptoCurrencyNetwork.main), |
| 63 | + Salvium(CryptoCurrencyNetwork.main), |
| 64 | + Solana(CryptoCurrencyNetwork.main), |
| 65 | + Stellar(CryptoCurrencyNetwork.main), |
| 66 | + Tezos(CryptoCurrencyNetwork.main), |
| 67 | + Wownero(CryptoCurrencyNetwork.main), |
| 68 | + Xelis(CryptoCurrencyNetwork.main), |
| 69 | + Bitcoin(CryptoCurrencyNetwork.test), |
| 70 | + Bitcoin(CryptoCurrencyNetwork.test4), |
| 71 | + Bitcoincash(CryptoCurrencyNetwork.test), |
| 72 | + BitcoinFrost(CryptoCurrencyNetwork.test), |
| 73 | + BitcoinFrost(CryptoCurrencyNetwork.test4), |
| 74 | + Dogecoin(CryptoCurrencyNetwork.test), |
| 75 | + Firo(CryptoCurrencyNetwork.test), |
| 76 | + Litecoin(CryptoCurrencyNetwork.test), |
| 77 | + Peercoin(CryptoCurrencyNetwork.test), |
| 78 | + Salvium(CryptoCurrencyNetwork.test), |
| 79 | + Stellar(CryptoCurrencyNetwork.test), |
| 80 | + Xelis(CryptoCurrencyNetwork.test), |
| 81 | +]); |
| 82 | +
|
| 83 | +final ({String from, String fromFuzzyNet, String to, String toFuzzyNet}) |
| 84 | +_swapDefaults = ( |
| 85 | + from: "BTC", |
| 86 | + fromFuzzyNet: "btc", |
| 87 | + to: "XMR", |
| 88 | + toFuzzyNet: "xmr", |
| 89 | +); |
| 90 | +EOF |
| 91 | + |
| 92 | +echo 'ensure_test_app_config.sh: created lib/app_config.g.dart' |
0 commit comments