diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 000000000..d7c1b7241
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,9 @@
+Issue Number (if Applicable): Fixes #
+
+# Description
+
+Please include a summary of the changes and which issue is fixed / feature is added.
+
+# Pull Request - Checklist
+
+- [ ] Initial Manual Tests Passed
diff --git a/.github/workflows/cache_dependencies.yml b/.github/workflows/cache_dependencies.yml
new file mode 100644
index 000000000..4d2dc136c
--- /dev/null
+++ b/.github/workflows/cache_dependencies.yml
@@ -0,0 +1,56 @@
+name: Cache Dependencies
+
+on:
+ push:
+ branches: [ main ]
+
+jobs:
+ test:
+
+ runs-on: ubuntu-20.04
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: '8.x'
+
+ - name: Flutter action
+ uses: subosito/flutter-action@v1
+ with:
+ flutter-version: '3.3.x'
+ channel: stable
+
+ - name: Install package dependencies
+ run: sudo apt-get install -y curl unzip automake build-essential file pkg-config git python libtool libtinfo5 cmake clang
+
+ - name: Execute Build and Setup Commands
+ run: |
+ sudo mkdir -p /opt/android
+ sudo chown $USER /opt/android
+ cd /opt/android
+ git clone https://github.com/cake-tech/cake_wallet.git --branch main
+ cd cake_wallet/scripts/android/
+ ./install_ndk.sh
+ source ./app_env.sh cakewallet
+ ./app_config.sh
+
+ - name: Cache Externals
+ id: cache-externals
+ uses: actions/cache@v3
+ with:
+ path: |
+ /opt/android/cake_wallet/cw_haven/android/.cxx
+ /opt/android/cake_wallet/cw_haven/ios/External
+ /opt/android/cake_wallet/cw_monero/android/.cxx
+ /opt/android/cake_wallet/cw_monero/ios/External
+ /opt/android/cake_wallet/cw_shared_external/ios/External
+ key: ${{ hashFiles('**/build_monero.sh', '**/build_haven.sh') }}
+
+ - if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }}
+ name: Generate Externals
+ run: |
+ cd /opt/android/cake_wallet/scripts/android/
+ source ./app_env.sh cakewallet
+ ./build_all.sh
+ ./copy_monero_deps.sh
diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build.yml
index 190b891e1..f8496ffcd 100644
--- a/.github/workflows/pr_test_build.yml
+++ b/.github/workflows/pr_test_build.yml
@@ -7,7 +7,10 @@ on:
jobs:
test:
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-20.04
+ env:
+ STORE_PASS: test@cake_wallet
+ KEY_PASS: test@cake_wallet
steps:
- uses: actions/checkout@v2
@@ -18,7 +21,7 @@ jobs:
- name: Flutter action
uses: subosito/flutter-action@v1
with:
- flutter-version: '3.3.x'
+ flutter-version: '3.7.x'
channel: stable
- name: Install package dependencies
@@ -34,6 +37,24 @@ jobs:
./install_ndk.sh
source ./app_env.sh cakewallet
./app_config.sh
+
+ - name: Cache Externals
+ id: cache-externals
+ uses: actions/cache@v3
+ with:
+ path: |
+ /opt/android/cake_wallet/cw_haven/android/.cxx
+ /opt/android/cake_wallet/cw_haven/ios/External
+ /opt/android/cake_wallet/cw_monero/android/.cxx
+ /opt/android/cake_wallet/cw_monero/ios/External
+ /opt/android/cake_wallet/cw_shared_external/ios/External
+ key: ${{ hashFiles('**/build_monero.sh', '**/build_haven.sh') }}
+
+ - if: ${{ steps.cache-externals.outputs.cache-hit != 'true' }}
+ name: Generate Externals
+ run: |
+ cd /opt/android/cake_wallet/scripts/android/
+ source ./app_env.sh cakewallet
./build_all.sh
./copy_monero_deps.sh
@@ -45,12 +66,12 @@ jobs:
- name: Generate KeyStore
run: |
cd /opt/android/cake_wallet/android/app
- keytool -genkey -v -keystore key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias testKey -noprompt -dname "CN=CakeWallet, OU=CakeWallet, O=CakeWallet, L=Florida, S=America, C=USA" -storepass ${{ secrets.STORE_PASS }} -keypass ${{ secrets.KEY_PASS }}
+ keytool -genkey -v -keystore key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias testKey -noprompt -dname "CN=CakeWallet, OU=CakeWallet, O=CakeWallet, L=Florida, S=America, C=USA" -storepass $STORE_PASS -keypass $KEY_PASS
- name: Generate key properties
run: |
cd /opt/android/cake_wallet
- flutter packages pub run tool/generate_android_key_properties.dart keyAlias=testKey storeFile=key.jks storePassword=${{ secrets.STORE_PASS }} keyPassword=${{ secrets.KEY_PASS }}
+ flutter packages pub run tool/generate_android_key_properties.dart keyAlias=testKey storeFile=key.jks storePassword=$STORE_PASS keyPassword=$KEY_PASS
- name: Generate localization
run: |
@@ -89,6 +110,7 @@ jobs:
echo "const onramperApiKey = '${{ secrets.ONRAMPER_API_KEY }}';" >> lib/.secrets.g.dart
echo "const anypayToken = '${{ secrets.ANY_PAY_TOKEN }}';" >> lib/.secrets.g.dart
echo "const ioniaClientId = '${{ secrets.IONIA_CLIENT_ID }}';" >> lib/.secrets.g.dart
+ echo "const twitterBearerToken = '${{ secrets.TWITTER_BEARER_TOKEN }}';" >> lib/.secrets.g.dart
- name: Rename app
run: sed -i -e "s/\${APP_NAME}/$GITHUB_HEAD_REF/g" /opt/android/cake_wallet/android/app/src/main/AndroidManifest.xml
@@ -111,19 +133,20 @@ jobs:
# --token ${{ secrets.APP_CENTER_TOKEN }} \
# --quiet
- - name: Send Test APK
- run: |
- cd /opt/android/cake_wallet
- var=$(curl --upload-file build/app/outputs/apk/release/app-release.apk https://transfer.sh/$GITHUB_HEAD_REF.apk -H "Max-Days: 10")
- curl ${{ secrets.SLACK_WEB_HOOK }} -H "Content-Type: application/json" -d '{"apk_link": "'"$var"'","ticket": "'"$GITHUB_HEAD_REF"'"}'
-
- name: Rename apk file
run: |
cd /opt/android/cake_wallet/build/app/outputs/apk/release
mkdir test-apk
- mv app-release.apk test-apk/$GITHUB_HEAD_REF.apk
+ cp app-release.apk test-apk/$GITHUB_HEAD_REF.apk
- name: Upload Artifact
uses: kittaakos/upload-artifact-as-is@v0
with:
path: /opt/android/cake_wallet/build/app/outputs/apk/release/test-apk/
+
+ - name: Send Test APK
+ continue-on-error: true
+ run: |
+ cd /opt/android/cake_wallet
+ var=$(curl --upload-file build/app/outputs/apk/release/app-release.apk https://transfer.sh/$GITHUB_HEAD_REF.apk -H "Max-Days: 10")
+ curl ${{ secrets.SLACK_WEB_HOOK }} -H "Content-Type: application/json" -d '{"apk_link": "'"$var"'","ticket": "'"$GITHUB_HEAD_REF"'"}'
diff --git a/LICENSE.md b/LICENSE.md
index 4f80e683b..4268b9710 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2022 Cake Labs LLC
+Copyright (c) 2018-2023 Cake Labs LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index bd74ccfbc..96f59e704 100644
--- a/README.md
+++ b/README.md
@@ -76,3 +76,59 @@ We have 24/7 free support. Please contact support@cakewallet.com
More instructions to follow
For instructions on how to build for Android: please view file `howto-build-android.md`
+
+# Contributing
+
+## Improving translations
+
+Edit the applicable `strings_XX.arb` file in `res/values/` and open a pull request with the changes.
+
+## Current list of language files:
+
+- English
+- Spanish
+- French
+- German
+- Italian
+- Portugese
+- Dutch
+- Polish
+- Croatian
+- Russian
+- Ukranian
+- Hindi
+- Japanese
+- Chinese
+- Korean
+- Thai
+- Arabic
+- Turkish
+- Burmese
+
+## Add a new language
+
+1. Create a new `strings_XX.arb` file in `res/values/`, replacing XX with the language's [ISO 639-1 code](https://en.wikipedia.org/wiki/ISO_639-1).
+
+2. Edit the strings in this file, replacing XXX below with the translation for each string.
+
+`"welcome" : "Welcome to",` -> `"welcome" : "XXX",`
+
+3. For strings where there is a variable, denoted by a $ symbol and braces, such as ${status}, the string in braces should not be translated. For example, when editing line 106:
+
+"time" : "${minutes}m ${seconds}s"
+
+The only parts to be translated, if needed, are the values m and s after the variables.
+
+4. Add the language to `lib/entities/language_service.dart` under both `supportedLocales` and `localeCountryCode`. Use the name of the language in the local language and in English in parentheses after for `supportedLocales`. Use the [ISO 3166-1 alpha-3 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for `localeCountryCode`. You must choose one country, so choose the country with the most native speakers of this language or is otherwise best associated with this language.
+
+5. Add a relevant flag to `assets/images/flags/XXXX.png`, replacing XXXX with the 3 digit localeCountryCode. The image must be 42x26 pixels with a 3 pixels of transparent margin on all 4 sides. You can resize the flag with [paint.net](https://www.getpaint.net/) to 36x20 pixels, expand the canvas to 42x26 pixels with the flag anchored in the middle, and then manually delete the 3 pixels on each side to make transparent. Or you can use another program like Photoshop.
+
+## Add a new fiat currency
+
+1. Check with [Cake Wallet support](https://guides.cakewallet.com) to see if the desired new fiat currency is available through our fiat API. Not all fiat currencies are.
+
+2. If the currency is associated strongly with a specific issuing country, map the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code with the applicable [ISO 3166-1 alpha-3 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) in `lib/entities/fiat_currency.dart`. If the currency is used in a whole region or organization, then map with a reasonable interpretation of this (eg: eur countryCode for EUR symbol).
+
+3. Add the raw mapping underneath in `lib/entities/fiat_currency.dart` following the same format as the others.
+
+4. Add a flag of the issuing country or organization to `assets/images/flags/XXXX.png`, replacing XXXX with the ISO 3166-1 alpha-3 code used above (eg: `usa.png`, `eur.png`). Do not add this if the flag with the same name already exists. The image must be 42x26 pixels with a 3 pixels of transparent margin on all 4 sides.
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 524f70011..396904041 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -18,6 +18,8 @@ analyzer:
linter:
rules:
- cancel_subscriptions
+ - always_declare_return_types
+ - prefer_final_fields
# analyzer:
diff --git a/android/app/src/main/AndroidManifestBase.xml b/android/app/src/main/AndroidManifestBase.xml
index 9f6b65785..2dbedcba9 100644
--- a/android/app/src/main/AndroidManifestBase.xml
+++ b/android/app/src/main/AndroidManifestBase.xml
@@ -6,6 +6,7 @@
+
+
+
+
diff --git a/assets/images/flags/mmr.png b/assets/images/flags/mmr.png
new file mode 100644
index 000000000..7fc6e1661
Binary files /dev/null and b/assets/images/flags/mmr.png differ
diff --git a/assets/images/flags/sau.png b/assets/images/flags/sau.png
new file mode 100644
index 000000000..97951983a
Binary files /dev/null and b/assets/images/flags/sau.png differ
diff --git a/assets/images/flags/tur.png b/assets/images/flags/tur.png
new file mode 100644
index 000000000..166c6313a
Binary files /dev/null and b/assets/images/flags/tur.png differ
diff --git a/assets/images/husd_icon.png b/assets/images/husd_icon.png
deleted file mode 100644
index 071027099..000000000
Binary files a/assets/images/husd_icon.png and /dev/null differ
diff --git a/cw_bitcoin/lib/bitcoin_amount_format.dart b/cw_bitcoin/lib/bitcoin_amount_format.dart
index c72d21960..d5a42d984 100644
--- a/cw_bitcoin/lib/bitcoin_amount_format.dart
+++ b/cw_bitcoin/lib/bitcoin_amount_format.dart
@@ -17,7 +17,7 @@ int stringDoubleToBitcoinAmount(String amount) {
int result = 0;
try {
- result = (double.parse(amount) * bitcoinAmountDivider).toInt();
+ result = (double.parse(amount) * bitcoinAmountDivider).round();
} catch (e) {
result = 0;
}
diff --git a/cw_bitcoin/lib/electrum_transaction_history.dart b/cw_bitcoin/lib/electrum_transaction_history.dart
index f8662eb95..9174fb3f8 100644
--- a/cw_bitcoin/lib/electrum_transaction_history.dart
+++ b/cw_bitcoin/lib/electrum_transaction_history.dart
@@ -72,7 +72,7 @@ abstract class ElectrumTransactionHistoryBase
txs.entries.forEach((entry) {
final val = entry.value;
- if (val is Map) {
+ if (val is Map) {
final tx = ElectrumTransactionInfo.fromJson(val, walletInfo.type);
_updateOrInsert(tx);
}
@@ -85,9 +85,6 @@ abstract class ElectrumTransactionHistoryBase
}
void _updateOrInsert(ElectrumTransactionInfo transaction) {
- if (transaction.id == null) {
- return;
- }
if (transactions[transaction.id] == null) {
transactions[transaction.id] = transaction;
@@ -98,6 +95,7 @@ abstract class ElectrumTransactionHistoryBase
originalTx?.height = transaction.height;
originalTx?.date ??= transaction.date;
originalTx?.isPending = transaction.isPending;
+ originalTx?.direction = transaction.direction;
}
}
}
diff --git a/cw_bitcoin/lib/electrum_transaction_info.dart b/cw_bitcoin/lib/electrum_transaction_info.dart
index 6e85a2f88..8d6ef0fea 100644
--- a/cw_bitcoin/lib/electrum_transaction_info.dart
+++ b/cw_bitcoin/lib/electrum_transaction_info.dart
@@ -228,9 +228,7 @@ class ElectrumTransactionInfo extends TransactionInfo {
m['id'] = id;
m['height'] = height;
m['amount'] = amount;
- // FIX-ME: Hardcoded value
- // m['direction'] = direction.index;
- m['direction'] = 0;
+ m['direction'] = direction.index;
m['date'] = date.millisecondsSinceEpoch;
m['isPending'] = isPending;
m['confirmations'] = confirmations;
diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart
index fad546d90..f31db7bb8 100644
--- a/cw_bitcoin/lib/electrum_wallet.dart
+++ b/cw_bitcoin/lib/electrum_wallet.dart
@@ -191,8 +191,10 @@ abstract class ElectrumWalletBase extends WalletBase with Serializable {
const CryptoCurrency({
String title = '',
int raw = -1,
- this.name,
+ required this.name,
+ this.fullName,
this.iconPath,
- this.tag,})
+ this.tag})
: super(title: title, raw: raw);
+ final String name;
final String? tag;
- final String? name;
+ final String? fullName;
final String? iconPath;
static const all = [
@@ -38,7 +36,7 @@ class CryptoCurrency extends EnumerableItem with Serializable {
CryptoCurrency.ape,
CryptoCurrency.avaxc,
CryptoCurrency.btt,
- CryptoCurrency.bttbsc,
+ CryptoCurrency.bttc,
CryptoCurrency.doge,
CryptoCurrency.firo,
CryptoCurrency.usdttrc20,
@@ -53,7 +51,6 @@ class CryptoCurrency extends EnumerableItem with Serializable {
CryptoCurrency.xvg,
CryptoCurrency.usdcpoly,
CryptoCurrency.dcr,
- CryptoCurrency.husd,
CryptoCurrency.kmd,
CryptoCurrency.mana,
CryptoCurrency.maticpoly,
@@ -70,339 +67,117 @@ class CryptoCurrency extends EnumerableItem with Serializable {
CryptoCurrency.stx,
];
- static const xmr = CryptoCurrency(title: 'XMR', iconPath: 'assets/images/monero_icon.png', name: 'Monero', raw: 0);
- static const ada = CryptoCurrency(title: 'ADA', iconPath: 'assets/images/ada_icon.png', name: 'Cardano', raw: 1);
- static const bch = CryptoCurrency(title: 'BCH', iconPath: 'assets/images/bch_icon.png',name: 'Bitcoin Cash', raw: 2);
- static const bnb = CryptoCurrency(title: 'BNB', iconPath: 'assets/images/bnb_icon.png', tag: 'BSC', name: 'Binance Coin', raw: 3);
- static const btc = CryptoCurrency(title: 'BTC', iconPath: 'assets/images/btc.png', name: 'Bitcoin', raw: 4);
- static const dai = CryptoCurrency(title: 'DAI', iconPath: 'assets/images/dai_icon.png', tag: 'ETH', name: 'Dai', raw: 5);
- static const dash = CryptoCurrency(title: 'DASH', iconPath: 'assets/images/dash_icon.png', name: 'Dash', raw: 6);
- static const eos = CryptoCurrency(title: 'EOS', iconPath: 'assets/images/eos_icon.png', name: 'EOS', raw: 7);
- static const eth = CryptoCurrency(title: 'ETH', iconPath: 'assets/images/eth_icon.png', name: 'Ethereum', raw: 8);
- static const ltc = CryptoCurrency(title: 'LTC', iconPath: 'assets/images/litecoin-ltc_icon.png', name: 'Litecoin', raw: 9);
- static const nano = CryptoCurrency(title: 'NANO', raw: 10);
- static const trx = CryptoCurrency(title: 'TRX', iconPath: 'assets/images/trx_icon.png', name: 'TRON', raw: 11);
- static const usdt = CryptoCurrency(title: 'USDT', iconPath: 'assets/images/usdt_icon.png', tag: 'OMNI', name: 'USDT', raw: 12);
- static const usdterc20 = CryptoCurrency(title: 'USDT', iconPath: 'assets/images/usdterc20_icon.png', tag: 'ETH', name: 'USDT', raw: 13);
- static const xlm = CryptoCurrency(title: 'XLM', iconPath: 'assets/images/xlm_icon.png', name: 'Stellar', raw: 14);
- static const xrp = CryptoCurrency(title: 'XRP', iconPath: 'assets/images/xrp_icon.png', name: 'Ripple', raw: 15);
- static const xhv = CryptoCurrency(title: 'XHV', iconPath: 'assets/images/xhv_logo.png', name: 'Haven Protocol', raw: 16);
+ static const havenCurrencies = [
+ xag,
+ xau,
+ xaud,
+ xbtc,
+ xcad,
+ xchf,
+ xcny,
+ xeur,
+ xgbp,
+ xjpy,
+ xnok,
+ xnzd,
+ xusd,
+ ];
- static const xag = CryptoCurrency(title: 'XAG', tag: 'XHV', raw: 17);
- static const xau = CryptoCurrency(title: 'XAU', tag: 'XHV', raw: 18);
- static const xaud = CryptoCurrency(title: 'XAUD', tag: 'XHV', raw: 19);
- static const xbtc = CryptoCurrency(title: 'XBTC', tag: 'XHV', raw: 20);
- static const xcad = CryptoCurrency(title: 'XCAD', tag: 'XHV', raw: 21);
- static const xchf = CryptoCurrency(title: 'XCHF', tag: 'XHV', raw: 22);
- static const xcny = CryptoCurrency(title: 'XCNY', tag: 'XHV', raw: 23);
- static const xeur = CryptoCurrency(title: 'XEUR', tag: 'XHV', raw: 24);
- static const xgbp = CryptoCurrency(title: 'XGBP', tag: 'XHV', raw: 25);
- static const xjpy = CryptoCurrency(title: 'XJPY', tag: 'XHV', raw: 26);
- static const xnok = CryptoCurrency(title: 'XNOK', tag: 'XHV', raw: 27);
- static const xnzd = CryptoCurrency(title: 'XNZD', tag: 'XHV', raw: 28);
- static const xusd = CryptoCurrency(title: 'XUSD', tag: 'XHV', raw: 29);
+ // title, tag (if applicable), fullName (if unique), raw, name, iconPath
+ static const xmr = CryptoCurrency(title: 'XMR', fullName: 'Monero', raw: 0, name: 'xmr', iconPath: 'assets/images/monero_icon.png');
+ static const ada = CryptoCurrency(title: 'ADA', fullName: 'Cardano', raw: 1, name: 'ada', iconPath: 'assets/images/ada_icon.png');
+ static const bch = CryptoCurrency(title: 'BCH', fullName: 'Bitcoin Cash', raw: 2, name: 'bch', iconPath: 'assets/images/bch_icon.png');
+ static const bnb = CryptoCurrency(title: 'BNB', tag: 'BSC', fullName: 'Binance Coin', raw: 3, name: 'bnb', iconPath: 'assets/images/bnb_icon.png');
+ static const btc = CryptoCurrency(title: 'BTC', fullName: 'Bitcoin', raw: 4, name: 'btc', iconPath: 'assets/images/btc.png');
+ static const dai = CryptoCurrency(title: 'DAI', tag: 'ETH', fullName: 'Dai', raw: 5, name: 'dai', iconPath: 'assets/images/dai_icon.png');
+ static const dash = CryptoCurrency(title: 'DASH', fullName: 'Dash', raw: 6, name: 'dash', iconPath: 'assets/images/dash_icon.png');
+ static const eos = CryptoCurrency(title: 'EOS', fullName: 'EOS', raw: 7, name: 'eos', iconPath: 'assets/images/eos_icon.png');
+ static const eth = CryptoCurrency(title: 'ETH', fullName: 'Ethereum', raw: 8, name: 'eth', iconPath: 'assets/images/eth_icon.png');
+ static const ltc = CryptoCurrency(title: 'LTC', fullName: 'Litecoin', raw: 9, name: 'ltc', iconPath: 'assets/images/litecoin-ltc_icon.png');
+ static const nano = CryptoCurrency(title: 'NANO', raw: 10, name: 'nano');
+ static const trx = CryptoCurrency(title: 'TRX', fullName: 'TRON', raw: 11, name: 'trx', iconPath: 'assets/images/trx_icon.png');
+ static const usdt = CryptoCurrency(title: 'USDT', tag: 'OMNI', fullName: 'USDT Tether', raw: 12, name: 'usdt', iconPath: 'assets/images/usdt_icon.png');
+ static const usdterc20 = CryptoCurrency(title: 'USDT', tag: 'ETH', fullName: 'USDT Tether', raw: 13, name: 'usdterc20', iconPath: 'assets/images/usdterc20_icon.png');
+ static const xlm = CryptoCurrency(title: 'XLM', fullName: 'Stellar', raw: 14, name: 'xlm', iconPath: 'assets/images/xlm_icon.png');
+ static const xrp = CryptoCurrency(title: 'XRP', fullName: 'Ripple', raw: 15, name: 'xrp', iconPath: 'assets/images/xrp_icon.png');
+ static const xhv = CryptoCurrency(title: 'XHV', fullName: 'Haven Protocol', raw: 16, name: 'xhv', iconPath: 'assets/images/xhv_logo.png');
- static const ape = CryptoCurrency(title: 'APE', iconPath: 'assets/images/ape_icon.png', tag: 'ETH', raw: 30);
- static const avaxc = CryptoCurrency(title: 'AVAX', iconPath: 'assets/images/avaxc_icon.png', tag: 'C-CHAIN', raw: 31);
- static const btt = CryptoCurrency(title: 'BTT', iconPath: 'assets/images/btt_icon.png', raw: 32);
- static const bttbsc = CryptoCurrency(title: 'BTT', iconPath: 'assets/images/bttbsc_icon.png', tag: 'BSC', raw: 33);
- static const doge = CryptoCurrency(title: 'DOGE', iconPath: 'assets/images/doge_icon.png', raw: 34);
- static const firo = CryptoCurrency(title: 'FIRO', iconPath: 'assets/images/firo_icon.png', raw: 35);
- static const usdttrc20 = CryptoCurrency(title: 'USDT', iconPath: 'assets/images/usdttrc20_icon.png', tag: 'TRX', raw: 36);
- static const hbar = CryptoCurrency(title: 'HBAR', iconPath: 'assets/images/hbar_icon.png', raw: 37);
- static const sc = CryptoCurrency(title: 'SC', iconPath: 'assets/images/sc_icon.png', raw: 38);
- static const sol = CryptoCurrency(title: 'SOL', iconPath: 'assets/images/sol_icon.png', raw: 39);
- static const usdc = CryptoCurrency(title: 'USDC', iconPath: 'assets/images/usdc_icon.png', tag: 'ETH', raw: 40);
- static const usdcsol = CryptoCurrency(title: 'USDC', iconPath: 'assets/images/usdcsol_icon.png', tag: 'SOL', raw: 41);
- static const zaddr = CryptoCurrency(title: 'ZZEC', tag: 'ZEC', name: 'Shielded Zcash', iconPath: 'assets/images/zaddr_icon.png', raw: 42);
- static const zec = CryptoCurrency(title: 'TZEC', tag: 'ZEC', name: 'Transparent Zcash', iconPath: 'assets/images/zec_icon.png', raw: 43);
- static const zen = CryptoCurrency(title: 'ZEN', iconPath: 'assets/images/zen_icon.png', raw: 44);
- static const xvg = CryptoCurrency(title: 'XVG', name: 'Verge', iconPath: 'assets/images/xvg_icon.png', raw: 45);
+ static const xag = CryptoCurrency(title: 'XAG', tag: 'XHV', raw: 17, name: 'xag');
+ static const xau = CryptoCurrency(title: 'XAU', tag: 'XHV', raw: 18, name: 'xau');
+ static const xaud = CryptoCurrency(title: 'XAUD', tag: 'XHV', raw: 19, name: 'xaud');
+ static const xbtc = CryptoCurrency(title: 'XBTC', tag: 'XHV', raw: 20, name: 'xbtc');
+ static const xcad = CryptoCurrency(title: 'XCAD', tag: 'XHV', raw: 21, name: 'xcad');
+ static const xchf = CryptoCurrency(title: 'XCHF', tag: 'XHV', raw: 22, name: 'xchf');
+ static const xcny = CryptoCurrency(title: 'XCNY', tag: 'XHV', raw: 23, name: 'xcny');
+ static const xeur = CryptoCurrency(title: 'XEUR', tag: 'XHV', raw: 24, name: 'xeur');
+ static const xgbp = CryptoCurrency(title: 'XGBP', tag: 'XHV', raw: 25, name: 'xgbp');
+ static const xjpy = CryptoCurrency(title: 'XJPY', tag: 'XHV', raw: 26, name: 'xjpy');
+ static const xnok = CryptoCurrency(title: 'XNOK', tag: 'XHV', raw: 27, name: 'xnok');
+ static const xnzd = CryptoCurrency(title: 'XNZD', tag: 'XHV', raw: 28, name: 'xnzd');
+ static const xusd = CryptoCurrency(title: 'XUSD', tag: 'XHV', raw: 29, name: 'xusd');
- static const usdcpoly = CryptoCurrency(title: 'USDC', iconPath: 'assets/images/usdc_icon.png', tag: 'POLY', raw: 46);
- static const dcr = CryptoCurrency(title: 'DCR', iconPath: 'assets/images/dcr_icon.png', raw: 47);
- static const husd = CryptoCurrency(title: 'HUSD', iconPath: 'assets/images/husd_icon.png', tag: 'ETH', raw: 48);
- static const kmd = CryptoCurrency(title: 'KMD', iconPath: 'assets/images/kmd_icon.png', raw: 49);
- static const mana = CryptoCurrency(title: 'MANA', iconPath: 'assets/images/mana_icon.png', tag: 'ETH', raw: 50);
- static const maticpoly = CryptoCurrency(title: 'MATIC', iconPath: 'assets/images/matic_icon.png', tag: 'POLY', raw: 51);
- static const matic = CryptoCurrency(title: 'MATIC', iconPath: 'assets/images/matic_icon.png', tag: 'ETH', raw: 52);
- static const mkr = CryptoCurrency(title: 'MKR', iconPath: 'assets/images/mkr_icon.png', tag: 'ETH', raw: 53);
- static const near = CryptoCurrency(title: 'NEAR', iconPath: 'assets/images/near_icon.png', raw: 54);
- static const oxt = CryptoCurrency(title: 'OXT', iconPath: 'assets/images/oxt_icon.png', tag: 'ETH', raw: 55);
- static const paxg = CryptoCurrency(title: 'PAXG', iconPath: 'assets/images/paxg_icon.png', tag: 'ETH', raw: 56);
- static const pivx = CryptoCurrency(title: 'PIVX', iconPath: 'assets/images/pivx_icon.png', raw: 57);
- static const rune = CryptoCurrency(title: 'RUNE', iconPath: 'assets/images/rune_icon.png', raw: 58);
- static const rvn = CryptoCurrency(title: 'RVN', iconPath: 'assets/images/rvn_icon.png', raw: 59);
- static const scrt = CryptoCurrency(title: 'SCRT', iconPath: 'assets/images/scrt_icon.png', raw: 60);
- static const uni = CryptoCurrency(title: 'UNI', iconPath: 'assets/images/uni_icon.png', tag: 'ETH', raw: 61);
- static const stx = CryptoCurrency(title: 'STX', iconPath: 'assets/images/stx_icon.png', raw: 62);
+ static const ape = CryptoCurrency(title: 'APE', tag: 'ETH', fullName: 'ApeCoin', raw: 30, name: 'ape', iconPath: 'assets/images/ape_icon.png');
+ static const avaxc = CryptoCurrency(title: 'AVAX', tag: 'C-CHAIN', raw: 31, name: 'avaxc', iconPath: 'assets/images/avaxc_icon.png');
+ static const btt = CryptoCurrency(title: 'BTT', tag: 'ETH', fullName: 'BitTorrent', raw: 32, name: 'btt', iconPath: 'assets/images/btt_icon.png');
+ static const bttc = CryptoCurrency(title: 'BTTC', tag: 'TRX', fullName: 'BitTorrent-NEW', raw: 33, name: 'bttc', iconPath: 'assets/images/bttbsc_icon.png');
+ static const doge = CryptoCurrency(title: 'DOGE', fullName: 'Dogecoin', raw: 34, name: 'doge', iconPath: 'assets/images/doge_icon.png');
+ static const firo = CryptoCurrency(title: 'FIRO', raw: 35, name: 'firo', iconPath: 'assets/images/firo_icon.png');
+ static const usdttrc20 = CryptoCurrency(title: 'USDT', tag: 'TRX', fullName: 'USDT Tether', raw: 36, name: 'usdttrc20', iconPath: 'assets/images/usdttrc20_icon.png');
+ static const hbar = CryptoCurrency(title: 'HBAR', fullName: 'Hedera', raw: 37, name: 'hbar', iconPath: 'assets/images/hbar_icon.png', );
+ static const sc = CryptoCurrency(title: 'SC', fullName: 'Siacoin', raw: 38, name: 'sc', iconPath: 'assets/images/sc_icon.png');
+ static const sol = CryptoCurrency(title: 'SOL', fullName: 'Solana', raw: 39, name: 'sol', iconPath: 'assets/images/sol_icon.png');
+ static const usdc = CryptoCurrency(title: 'USDC', tag: 'ETH', fullName: 'USD Coin', raw: 40, name: 'usdc', iconPath: 'assets/images/usdc_icon.png');
+ static const usdcsol = CryptoCurrency(title: 'USDC', tag: 'SOL', fullName: 'USDC Coin', raw: 41, name: 'usdcsol', iconPath: 'assets/images/usdcsol_icon.png');
+ static const zaddr = CryptoCurrency(title: 'ZZEC', tag: 'ZEC', fullName: 'Shielded Zcash', iconPath: 'assets/images/zaddr_icon.png', raw: 42, name: 'zaddr');
+ static const zec = CryptoCurrency(title: 'TZEC', tag: 'ZEC', fullName: 'Transparent Zcash', iconPath: 'assets/images/zec_icon.png', raw: 43, name: 'zec');
+ static const zen = CryptoCurrency(title: 'ZEN', fullName: 'Horizen', raw: 44, name: 'zen', iconPath: 'assets/images/zen_icon.png');
+ static const xvg = CryptoCurrency(title: 'XVG', fullName: 'Verge', raw: 45, name: 'xvg', iconPath: 'assets/images/xvg_icon.png');
+ static const usdcpoly = CryptoCurrency(title: 'USDC', tag: 'POLY', fullName: 'USD Coin', raw: 46, name: 'usdcpoly', iconPath: 'assets/images/usdc_icon.png');
+ static const dcr = CryptoCurrency(title: 'DCR', fullName: 'Decred', raw: 47, name: 'dcr', iconPath: 'assets/images/dcr_icon.png');
+ static const kmd = CryptoCurrency(title: 'KMD', fullName: 'Komodo', raw: 48, name: 'kmd', iconPath: 'assets/images/kmd_icon.png');
+ static const mana = CryptoCurrency(title: 'MANA', tag: 'ETH', fullName: 'Decentraland', raw: 49, name: 'mana', iconPath: 'assets/images/mana_icon.png');
+ static const maticpoly = CryptoCurrency(title: 'MATIC', tag: 'POLY', fullName: 'Polygon', raw: 50, name: 'maticpoly', iconPath: 'assets/images/matic_icon.png');
+ static const matic = CryptoCurrency(title: 'MATIC', tag: 'ETH', fullName: 'Polygon', raw: 51, name: 'matic', iconPath: 'assets/images/matic_icon.png');
+ static const mkr = CryptoCurrency(title: 'MKR', tag: 'ETH', fullName: 'Maker', raw: 52, name: 'mkr', iconPath: 'assets/images/mkr_icon.png');
+ static const near = CryptoCurrency(title: 'NEAR', fullName: 'NEAR Protocol', raw: 53, name: 'near', iconPath: 'assets/images/near_icon.png');
+ static const oxt = CryptoCurrency(title: 'OXT', tag: 'ETH', fullName: 'Orchid', raw: 54, name: 'oxt', iconPath: 'assets/images/oxt_icon.png');
+ static const paxg = CryptoCurrency(title: 'PAXG', tag: 'ETH', fullName: 'Pax Gold', raw: 55, name: 'paxg', iconPath: 'assets/images/paxg_icon.png');
+ static const pivx = CryptoCurrency(title: 'PIVX', raw: 56, name: 'pivx', iconPath: 'assets/images/pivx_icon.png');
+ static const rune = CryptoCurrency(title: 'RUNE', fullName: 'Thorchain', raw: 57, name: 'rune', iconPath: 'assets/images/rune_icon.png');
+ static const rvn = CryptoCurrency(title: 'RVN', fullName: 'Ravencoin', raw: 58, name: 'rvn', iconPath: 'assets/images/rvn_icon.png');
+ static const scrt = CryptoCurrency(title: 'SCRT', fullName: 'Secret Network', raw: 59, name: 'scrt', iconPath: 'assets/images/scrt_icon.png');
+ static const uni = CryptoCurrency(title: 'UNI', tag: 'ETH', fullName: 'Uniswap', raw: 60, name: 'uni', iconPath: 'assets/images/uni_icon.png');
+ static const stx = CryptoCurrency(title: 'STX', fullName: 'Stacks', raw: 61, name: 'stx', iconPath: 'assets/images/stx_icon.png');
+ static final Map _rawCurrencyMap =
+ [...all, ...havenCurrencies].fold