Merge remote-tracking branch 'origin/main'
25
.gitignore
vendored
|
@ -141,9 +141,28 @@ lib/wownero/wownero.dart
|
|||
lib/zano/zano.dart
|
||||
lib/decred/decred.dart
|
||||
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_180.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_120.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon@2x.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon@2x~ipad.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon@3x.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-20@2x.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-20@2x~ipad.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-20@3x.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-20~ipad.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-29.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-29@2x.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-29@2x~ipad.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-29@3x.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-29~ipad.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-40@2x.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-40@2x~ipad.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-40@3x.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-40~ipad.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-60@2x~car.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-60@3x~car.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5@2x~ipad.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon~ios-marketing.png
|
||||
ios/Runner/Assets.xcassets/AppIcon.appiconset/AppIcon~ipad.png
|
||||
|
||||
ios/Runner/Info.plist
|
||||
android/app/src/main/res/mipmap-*
|
||||
android/app/src/main/res/drawable/ic_launcher.png
|
||||
|
|
11
README.md
|
@ -26,10 +26,13 @@ Cake Wallet includes support for several cryptocurrencies, including:
|
|||
* Ethereum (ETH)
|
||||
* Litecoin (LTC)
|
||||
* Bitcoin Cash (BCH)
|
||||
* Polygon (Pol)
|
||||
* Polygon (POL)
|
||||
* Solana (SOL)
|
||||
* Tron (TRX)
|
||||
* Nano (XNO)
|
||||
* Haven (XHV)
|
||||
* Zano (ZANO)
|
||||
* Decred (DCR)
|
||||
* Wownero (WOW)
|
||||
|
||||
## Features
|
||||
|
||||
|
@ -81,10 +84,6 @@ Cake Wallet includes support for several cryptocurrencies, including:
|
|||
* Automatically generate new addresses
|
||||
* Specify multiple recipients for batch sending
|
||||
|
||||
### Haven Specific Features
|
||||
|
||||
* Send, receive, and store XHV and all xAssets like xUSD, xEUR, xAG, etc.
|
||||
|
||||
# Monero.com by Cake Wallet for Android and iOS
|
||||
|
||||
## Open Source Monero-Only Wallet
|
||||
|
|
BIN
assets/images/ios_icons/cakewallet_ios_icons/AppIcon-20@2x.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/images/ios_icons/cakewallet_ios_icons/AppIcon-20@3x.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
assets/images/ios_icons/cakewallet_ios_icons/AppIcon-20~ipad.png
Normal file
After Width: | Height: | Size: 591 B |
BIN
assets/images/ios_icons/cakewallet_ios_icons/AppIcon-29.png
Normal file
After Width: | Height: | Size: 1,019 B |
BIN
assets/images/ios_icons/cakewallet_ios_icons/AppIcon-29@2x.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.5 KiB |
BIN
assets/images/ios_icons/cakewallet_ios_icons/AppIcon-29@3x.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
assets/images/ios_icons/cakewallet_ios_icons/AppIcon-29~ipad.png
Normal file
After Width: | Height: | Size: 1,019 B |
BIN
assets/images/ios_icons/cakewallet_ios_icons/AppIcon-40@2x.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
BIN
assets/images/ios_icons/cakewallet_ios_icons/AppIcon-40@3x.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
assets/images/ios_icons/cakewallet_ios_icons/AppIcon-40~ipad.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 9.4 KiB |
BIN
assets/images/ios_icons/cakewallet_ios_icons/AppIcon@2x.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
assets/images/ios_icons/cakewallet_ios_icons/AppIcon@2x~ipad.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
assets/images/ios_icons/cakewallet_ios_icons/AppIcon@3x.png
Normal file
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 201 KiB |
BIN
assets/images/ios_icons/cakewallet_ios_icons/AppIcon~ipad.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon-20@2x.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon-20@2x~ipad.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon-20@3x.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon-20~ipad.png
Normal file
After Width: | Height: | Size: 688 B |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon-29.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon-29@2x.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon-29@2x~ipad.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon-29@3x.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon-29~ipad.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon-40@2x.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon-40@2x~ipad.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon-40@3x.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon-40~ipad.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon-60@2x~car.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon-60@3x~car.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 6.5 KiB |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon@2x.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon@2x~ipad.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon@3x.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 68 KiB |
BIN
assets/images/ios_icons/monero_ios_icons/AppIcon~ipad.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
|
@ -17,11 +17,11 @@ class Erc20Token extends CryptoCurrency with HiveObjectMixin {
|
|||
@HiveField(4, defaultValue: true)
|
||||
bool _enabled;
|
||||
@HiveField(5)
|
||||
final String? iconPath;
|
||||
String? iconPath;
|
||||
@HiveField(6)
|
||||
final String? tag;
|
||||
@HiveField(7, defaultValue: false)
|
||||
final bool isPotentialScam;
|
||||
bool isPotentialScam;
|
||||
|
||||
bool get enabled => _enabled;
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ String walletTypeToDisplayName(WalletType type) {
|
|||
case WalletType.banano:
|
||||
return 'Banano (BAN)';
|
||||
case WalletType.polygon:
|
||||
return 'Polygon (MATIC)';
|
||||
return 'Polygon (POL)';
|
||||
case WalletType.solana:
|
||||
return 'Solana (SOL)';
|
||||
case WalletType.tron:
|
||||
|
|
|
@ -76,9 +76,13 @@ class EthereumWallet extends EVMChainWallet {
|
|||
await erc20TokensBox.deleteFromDisk();
|
||||
|
||||
// Add all the previous tokens with configs to the new box
|
||||
evmChainErc20TokensBox.addAll(allValues);
|
||||
await evmChainErc20TokensBox.addAll(allValues);
|
||||
}
|
||||
|
||||
@override
|
||||
List<String> get getDefaultTokenContractAddresses =>
|
||||
DefaultEthereumErc20Tokens().initialErc20Tokens.map((e) => e.contractAddress).toList();
|
||||
|
||||
@override
|
||||
EVMChainTransactionInfo getTransactionInfo(
|
||||
EVMChainTransactionModel transactionModel, String address) {
|
||||
|
|
|
@ -144,6 +144,8 @@ abstract class EVMChainWalletBase
|
|||
// required WalletInfo walletInfo,
|
||||
// });
|
||||
|
||||
List<String> get getDefaultTokenContractAddresses;
|
||||
|
||||
Future<void> initErc20TokensBox();
|
||||
|
||||
String getTransactionHistoryFileName();
|
||||
|
@ -171,6 +173,9 @@ abstract class EVMChainWalletBase
|
|||
await walletAddresses.init();
|
||||
await transactionHistory.init();
|
||||
|
||||
// check for Already existing scam tokens, cuz users can get scammed twice ¯\_(ツ)_/¯
|
||||
await _checkForExistingScamTokens();
|
||||
|
||||
if (walletInfo.isHardwareWallet) {
|
||||
_evmChainPrivateKey = EvmLedgerCredentials(walletInfo.address);
|
||||
walletAddresses.address = walletInfo.address;
|
||||
|
@ -186,6 +191,31 @@ abstract class EVMChainWalletBase
|
|||
await save();
|
||||
}
|
||||
|
||||
Future<void> _checkForExistingScamTokens() async {
|
||||
final baseCurrencySymbols = CryptoCurrency.all.map((e) => e.title.toUpperCase()).toList();
|
||||
|
||||
for (var token in erc20Currencies) {
|
||||
bool isPotentialScam = false;
|
||||
|
||||
bool isWhitelisted =
|
||||
getDefaultTokenContractAddresses.any((element) => element == token.contractAddress);
|
||||
|
||||
final tokenSymbol = token.title.toUpperCase();
|
||||
|
||||
// check if the token symbol is the same as any of the base currencies symbols (ETH, SOL, POL, TRX, etc):
|
||||
// if it is, then it's probably a scam unless it's in the whitelist
|
||||
if (baseCurrencySymbols.contains(tokenSymbol.trim().toUpperCase()) && !isWhitelisted) {
|
||||
isPotentialScam = true;
|
||||
}
|
||||
|
||||
if (isPotentialScam) {
|
||||
token.isPotentialScam = true;
|
||||
token.iconPath = null;
|
||||
await token.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
int calculateEstimatedFee(TransactionPriority priority, int? amount) {
|
||||
{
|
||||
|
|
|
@ -49,6 +49,10 @@ class PolygonWallet extends EVMChainWallet {
|
|||
}
|
||||
}
|
||||
|
||||
@override
|
||||
List<String> get getDefaultTokenContractAddresses =>
|
||||
DefaultPolygonErc20Tokens().initialPolygonErc20Tokens.map((e) => e.contractAddress).toList();
|
||||
|
||||
@override
|
||||
Future<bool> checkIfScanProviderIsEnabled() async {
|
||||
bool isPolygonScanEnabled = (await sharedPrefs.future).getBool("use_polygonscan") ?? true;
|
||||
|
|
|
@ -1,114 +1,134 @@
|
|||
{
|
||||
"images" : [
|
||||
"images": [
|
||||
{
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x",
|
||||
"size" : "20x20"
|
||||
"filename": "AppIcon@2x.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "2x",
|
||||
"size": "60x60"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x",
|
||||
"size" : "20x20"
|
||||
"filename": "AppIcon@3x.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "3x",
|
||||
"size": "60x60"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-29x29@2x 1.png",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x",
|
||||
"size" : "29x29"
|
||||
"filename": "AppIcon~ipad.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "1x",
|
||||
"size": "76x76"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x",
|
||||
"size" : "29x29"
|
||||
"filename": "AppIcon@2x~ipad.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "2x",
|
||||
"size": "76x76"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x",
|
||||
"size" : "40x40"
|
||||
"filename": "AppIcon-83.5@2x~ipad.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "2x",
|
||||
"size": "83.5x83.5"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x",
|
||||
"size" : "40x40"
|
||||
"filename": "AppIcon-40@2x.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "2x",
|
||||
"size": "40x40"
|
||||
},
|
||||
{
|
||||
"filename" : "app_icon_120.png",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "2x",
|
||||
"size" : "60x60"
|
||||
"filename": "AppIcon-40@3x.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "3x",
|
||||
"size": "40x40"
|
||||
},
|
||||
{
|
||||
"filename" : "app_icon_180.png",
|
||||
"idiom" : "iphone",
|
||||
"scale" : "3x",
|
||||
"size" : "60x60"
|
||||
"filename": "AppIcon-40~ipad.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "1x",
|
||||
"size": "40x40"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"idiom" : "ipad",
|
||||
"scale" : "1x",
|
||||
"size" : "20x20"
|
||||
"filename": "AppIcon-40@2x~ipad.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "2x",
|
||||
"size": "40x40"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "20x20"
|
||||
"filename": "AppIcon-20@2x.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "2x",
|
||||
"size": "20x20"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"idiom" : "ipad",
|
||||
"scale" : "1x",
|
||||
"size" : "29x29"
|
||||
"filename": "AppIcon-20@3x.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "3x",
|
||||
"size": "20x20"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "29x29"
|
||||
"filename": "AppIcon-20~ipad.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "1x",
|
||||
"size": "20x20"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-40x40@1x 1.png",
|
||||
"idiom" : "ipad",
|
||||
"scale" : "1x",
|
||||
"size" : "40x40"
|
||||
"filename": "AppIcon-20@2x~ipad.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "2x",
|
||||
"size": "20x20"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "40x40"
|
||||
"filename": "AppIcon-29.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "1x",
|
||||
"size": "29x29"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"idiom" : "ipad",
|
||||
"scale" : "1x",
|
||||
"size" : "76x76"
|
||||
"filename": "AppIcon-29@2x.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "2x",
|
||||
"size": "29x29"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "76x76"
|
||||
"filename": "AppIcon-29@3x.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "3x",
|
||||
"size": "29x29"
|
||||
},
|
||||
{
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"idiom" : "ipad",
|
||||
"scale" : "2x",
|
||||
"size" : "83.5x83.5"
|
||||
"filename": "AppIcon-29~ipad.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "1x",
|
||||
"size": "29x29"
|
||||
},
|
||||
{
|
||||
"filename" : "app_icon_1024.png",
|
||||
"idiom" : "ios-marketing",
|
||||
"scale" : "1x",
|
||||
"size" : "1024x1024"
|
||||
"filename": "AppIcon-29@2x~ipad.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "2x",
|
||||
"size": "29x29"
|
||||
},
|
||||
{
|
||||
"filename": "AppIcon-60@2x~car.png",
|
||||
"idiom": "car",
|
||||
"scale": "2x",
|
||||
"size": "60x60"
|
||||
},
|
||||
{
|
||||
"filename": "AppIcon-60@3x~car.png",
|
||||
"idiom": "car",
|
||||
"scale": "3x",
|
||||
"size": "60x60"
|
||||
},
|
||||
{
|
||||
"filename": "AppIcon~ios-marketing.png",
|
||||
"idiom": "ios-marketing",
|
||||
"scale": "1x",
|
||||
"size": "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
"info": {
|
||||
"author": "iconkitchen",
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 880 B |
Before Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 7 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 10 KiB |
|
@ -6,7 +6,6 @@ import 'package:cake_wallet/buy/moonpay/moonpay_provider.dart';
|
|||
import 'package:cake_wallet/buy/onramper/onramper_buy_provider.dart';
|
||||
import 'package:cake_wallet/buy/robinhood/robinhood_buy_provider.dart';
|
||||
import 'package:cake_wallet/di.dart';
|
||||
import 'package:cw_core/wallet_type.dart';
|
||||
|
||||
enum ProviderType { robinhood, dfx, onramper, moonpay, meld, kriptonim }
|
||||
|
||||
|
@ -47,7 +46,7 @@ extension ProviderTypeName on ProviderType {
|
|||
}
|
||||
|
||||
class ProvidersHelper {
|
||||
static List<ProviderType> getAvailableBuyProviderTypes(WalletType walletType) => [
|
||||
static List<ProviderType> getAvailableBuyProviderTypes() => [
|
||||
ProviderType.robinhood,
|
||||
ProviderType.dfx,
|
||||
ProviderType.onramper,
|
||||
|
@ -55,7 +54,7 @@ class ProvidersHelper {
|
|||
ProviderType.kriptonim
|
||||
];
|
||||
|
||||
static List<ProviderType> getAvailableSellProviderTypes(WalletType walletType) => [
|
||||
static List<ProviderType> getAvailableSellProviderTypes() => [
|
||||
ProviderType.robinhood,
|
||||
ProviderType.dfx,
|
||||
ProviderType.onramper,
|
||||
|
@ -63,7 +62,7 @@ class ProvidersHelper {
|
|||
ProviderType.kriptonim
|
||||
];
|
||||
|
||||
static BuyProvider? getProviderByType(ProviderType type) {
|
||||
static BuyProvider getProviderByType(ProviderType type) {
|
||||
switch (type) {
|
||||
case ProviderType.robinhood:
|
||||
return getIt.get<RobinhoodBuyProvider>();
|
||||
|
@ -77,8 +76,6 @@ class ProvidersHelper {
|
|||
return getIt.get<MeldBuyProvider>();
|
||||
case ProviderType.kriptonim:
|
||||
return getIt.get<KryptonimBuyProvider>();
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
import 'package:cake_wallet/utils/show_pop_up.dart';
|
||||
|
@ -68,7 +67,9 @@ class EditBackupPasswordPage extends BasePage {
|
|||
actionRightButton: () async {
|
||||
await editBackupPasswordViewModel.save();
|
||||
Navigator.of(dialogContext).pop();
|
||||
Navigator.of(context).pop();
|
||||
if (context.mounted) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
},
|
||||
actionLeftButton: () => Navigator.of(dialogContext).pop());
|
||||
});
|
||||
|
|
|
@ -185,7 +185,7 @@ class AddressPage extends BasePage {
|
|||
}
|
||||
|
||||
reaction((_) => receiveOptionViewModel.selectedReceiveOption, (ReceivePageOption option) {
|
||||
if (bitcoin!.isBitcoinReceivePageOption(option)) {
|
||||
if (dashboardViewModel.type == WalletType.bitcoin && bitcoin!.isBitcoinReceivePageOption(option)) {
|
||||
addressListViewModel.setAddressType(bitcoin!.getOptionToType(option));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -47,6 +47,8 @@ class ActionButton extends StatelessWidget {
|
|||
SizedBox(height: 4),
|
||||
Text(
|
||||
title,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.visible,
|
||||
style: TextStyle(
|
||||
fontSize: 9,
|
||||
color: textColor ??
|
||||
|
|
|
@ -98,7 +98,7 @@ class SendPage extends BasePage {
|
|||
return MergeSemantics(
|
||||
child: SizedBox(
|
||||
height: isMobileView ? 37 : 45,
|
||||
width: isMobileView ? 47: 45,
|
||||
width: isMobileView ? 47 : 45,
|
||||
child: ButtonTheme(
|
||||
minWidth: double.minPositive,
|
||||
child: Semantics(
|
||||
|
@ -397,7 +397,6 @@ class SendPage extends BasePage {
|
|||
return LoadingPrimaryButton(
|
||||
key: ValueKey('send_page_send_button_key'),
|
||||
onPressed: () async {
|
||||
|
||||
//Request dummy node to get the focus out of the text fields
|
||||
FocusScope.of(context).requestFocus(FocusNode());
|
||||
|
||||
|
@ -507,7 +506,6 @@ class SendPage extends BasePage {
|
|||
Navigator.of(loadingBottomSheetContext!).pop();
|
||||
}
|
||||
|
||||
|
||||
if (state is FailureState) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
showPopUp<void>(
|
||||
|
@ -525,7 +523,6 @@ class SendPage extends BasePage {
|
|||
}
|
||||
|
||||
if (state is IsExecutingState) {
|
||||
|
||||
// wait a bit to avoid showing the loading dialog if transaction is failed
|
||||
await Future.delayed(const Duration(milliseconds: 300));
|
||||
final currentState = sendViewModel.state;
|
||||
|
@ -584,8 +581,6 @@ class SendPage extends BasePage {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (state is TransactionCommitted) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
if (!context.mounted) {
|
||||
|
@ -594,7 +589,8 @@ class SendPage extends BasePage {
|
|||
|
||||
newContactAddress = newContactAddress ?? sendViewModel.newContactAddress();
|
||||
|
||||
if (newContactAddress?.address != null && isRegularElectrumAddress(newContactAddress!.address)) {
|
||||
if (newContactAddress?.address != null &&
|
||||
isRegularElectrumAddress(newContactAddress!.address)) {
|
||||
newContactAddress = null;
|
||||
}
|
||||
|
||||
|
@ -606,47 +602,53 @@ class SendPage extends BasePage {
|
|||
builder: (BuildContext bottomSheetContext) {
|
||||
return showContactSheet
|
||||
? InfoBottomSheet(
|
||||
currentTheme: currentTheme,
|
||||
showDontAskMeCheckbox: true,
|
||||
onCheckboxChanged: (value) => sendViewModel.setShowAddressBookPopup(!value),
|
||||
titleText: S.of(bottomSheetContext).transaction_sent,
|
||||
contentImage: 'assets/images/contact_icon.svg',
|
||||
contentImageColor: Theme.of(context)
|
||||
.extension<CakeTextTheme>()!
|
||||
.titleColor,
|
||||
content: S.of(bottomSheetContext).add_contact_to_address_book,
|
||||
isTwoAction: true,
|
||||
leftButtonText: 'No',
|
||||
rightButtonText: 'Yes',
|
||||
actionLeftButton: () {
|
||||
Navigator.of(bottomSheetContext).pop();
|
||||
Navigator.of(context)
|
||||
.pushNamedAndRemoveUntil(Routes.dashboard, (route) => false);
|
||||
RequestReviewHandler.requestReview();
|
||||
newContactAddress = null;
|
||||
},
|
||||
actionRightButton: () {
|
||||
Navigator.of(bottomSheetContext).pop();
|
||||
RequestReviewHandler.requestReview();
|
||||
Navigator.of(context)
|
||||
.pushNamed(Routes.addressBookAddContact, arguments: newContactAddress);
|
||||
newContactAddress = null;
|
||||
},
|
||||
)
|
||||
currentTheme: currentTheme,
|
||||
showDontAskMeCheckbox: true,
|
||||
onCheckboxChanged: (value) => sendViewModel.setShowAddressBookPopup(!value),
|
||||
titleText: S.of(bottomSheetContext).transaction_sent,
|
||||
contentImage: 'assets/images/contact_icon.svg',
|
||||
contentImageColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
|
||||
content: S.of(bottomSheetContext).add_contact_to_address_book,
|
||||
isTwoAction: true,
|
||||
leftButtonText: 'No',
|
||||
rightButtonText: 'Yes',
|
||||
actionLeftButton: () {
|
||||
Navigator.of(bottomSheetContext).pop();
|
||||
if (context.mounted) {
|
||||
Navigator.of(context)
|
||||
.pushNamedAndRemoveUntil(Routes.dashboard, (route) => false);
|
||||
}
|
||||
RequestReviewHandler.requestReview();
|
||||
newContactAddress = null;
|
||||
},
|
||||
actionRightButton: () {
|
||||
Navigator.of(bottomSheetContext).pop();
|
||||
RequestReviewHandler.requestReview();
|
||||
if (context.mounted) {
|
||||
Navigator.of(context).pushNamed(Routes.addressBookAddContact,
|
||||
arguments: newContactAddress);
|
||||
}
|
||||
newContactAddress = null;
|
||||
},
|
||||
)
|
||||
: InfoBottomSheet(
|
||||
currentTheme: currentTheme,
|
||||
titleText: S.of(bottomSheetContext).transaction_sent,
|
||||
contentImage: 'assets/images/birthday_cake.svg',
|
||||
actionButtonText: S.of(bottomSheetContext).close,
|
||||
actionButtonKey: ValueKey('send_page_sent_dialog_ok_button_key'),
|
||||
actionButton: () {
|
||||
Navigator.of(bottomSheetContext).pop();
|
||||
Navigator.of(context)
|
||||
.pushNamedAndRemoveUntil(Routes.dashboard, (route) => false);
|
||||
RequestReviewHandler.requestReview();
|
||||
newContactAddress = null;
|
||||
},
|
||||
);
|
||||
currentTheme: currentTheme,
|
||||
titleText: S.of(bottomSheetContext).transaction_sent,
|
||||
contentImage: 'assets/images/birthday_cake.svg',
|
||||
actionButtonText: S.of(bottomSheetContext).close,
|
||||
actionButtonKey: ValueKey('send_page_sent_dialog_ok_button_key'),
|
||||
actionButton: () {
|
||||
Navigator.of(bottomSheetContext).pop();
|
||||
Future.delayed(Duration.zero, () {
|
||||
if (context.mounted) {
|
||||
Navigator.of(context)
|
||||
.pushNamedAndRemoveUntil(Routes.dashboard, (route) => false);
|
||||
}
|
||||
RequestReviewHandler.requestReview();
|
||||
newContactAddress = null;
|
||||
});
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
|
@ -678,8 +680,7 @@ class SendPage extends BasePage {
|
|||
currentTheme: currentTheme,
|
||||
titleText: S.of(bottomSheetContext).proceed_on_device,
|
||||
contentImage: 'assets/images/hardware_wallet/ledger_nano_x.png',
|
||||
contentImageColor:
|
||||
Theme.of(context).extension<CakeTextTheme>()!.titleColor,
|
||||
contentImageColor: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
|
||||
content: S.of(bottomSheetContext).proceed_on_device_description,
|
||||
isTwoAction: false,
|
||||
actionButtonText: S.of(context).cancel,
|
||||
|
@ -778,5 +779,4 @@ class SendPage extends BasePage {
|
|||
|
||||
return isValid;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ import 'package:cake_wallet/store/app_store.dart';
|
|||
import 'package:cake_wallet/store/settings_store.dart';
|
||||
import 'package:cake_wallet/themes/theme_base.dart';
|
||||
import 'package:cw_core/crypto_currency.dart';
|
||||
import 'package:cw_core/currency_for_wallet_type.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:mobx/mobx.dart';
|
||||
|
@ -61,21 +60,17 @@ abstract class BuySellViewModelBase extends WalletChangeListenerViewModel with S
|
|||
late Timer bestRateSync;
|
||||
|
||||
List<BuyProvider> get availableBuyProviders {
|
||||
final providerTypes = ProvidersHelper.getAvailableBuyProviderTypes(
|
||||
walletTypeForCurrency(cryptoCurrency) ?? wallet.type);
|
||||
final providerTypes = ProvidersHelper.getAvailableBuyProviderTypes();
|
||||
return providerTypes
|
||||
.map((type) => ProvidersHelper.getProviderByType(type))
|
||||
.where((provider) => provider != null)
|
||||
.cast<BuyProvider>()
|
||||
.toList();
|
||||
}
|
||||
|
||||
List<BuyProvider> get availableSellProviders {
|
||||
final providerTypes = ProvidersHelper.getAvailableSellProviderTypes(
|
||||
walletTypeForCurrency(cryptoCurrency) ?? wallet.type);
|
||||
final providerTypes = ProvidersHelper.getAvailableSellProviderTypes();
|
||||
return providerTypes
|
||||
.map((type) => ProvidersHelper.getProviderByType(type))
|
||||
.where((provider) => provider != null)
|
||||
.cast<BuyProvider>()
|
||||
.toList();
|
||||
}
|
||||
|
|
|
@ -1,24 +1,101 @@
|
|||
#!/bin/sh
|
||||
|
||||
ICON_120_PATH=""
|
||||
ICON_180_PATH=""
|
||||
ICON_1024_PATH=""
|
||||
ICON_2x_PATH=""
|
||||
ICON_2x_ipad_PATH=""
|
||||
ICON_3x_PATH=""
|
||||
ICON_20_2x_PATH=""
|
||||
ICON_20_2x_ipad_PATH=""
|
||||
ICON_20_3x_PATH=""
|
||||
ICON_20_ipad_PATH=""
|
||||
ICON_29_PATH=""
|
||||
ICON_29_2x_PATH=""
|
||||
ICON_29_2x_ipad_PATH=""
|
||||
ICON_29_3x_PATH=""
|
||||
ICON_29_3x_ipad_PATH=""
|
||||
ICON_29_ipad_PATH=""
|
||||
ICON_40_2x_PATH=""
|
||||
ICON_40_2x_ipad_PATH=""
|
||||
ICON_40_3x_PATH=""
|
||||
ICON_40_ipad_PATH=""
|
||||
ICON_60_2x_PATH=""
|
||||
ICON_60_3x_PATH=""
|
||||
ICON_83_2x_ipad_PATH=""
|
||||
ICON_marketing_PATH=""
|
||||
ICON_ipad_PATH=""
|
||||
|
||||
ICON_DIRECTORY=""
|
||||
|
||||
DEST_DIR_PATH=`pwd`/../../ios/Runner/Assets.xcassets/AppIcon.appiconset
|
||||
|
||||
case $APP_IOS_TYPE in
|
||||
"monero.com")
|
||||
ICON_120_PATH=`pwd`/../../assets/images/monero.com_icon_120.png
|
||||
ICON_180_PATH=`pwd`/../../assets/images/monero.com_icon_180.png
|
||||
ICON_1024_PATH=`pwd`/../../assets/images/monero.com_icon_1024.png;;
|
||||
ICON_DIRECTORY=monero_ios_icons;;
|
||||
"cakewallet")
|
||||
ICON_120_PATH=`pwd`/../../assets/images/cakewallet_icon_120.png
|
||||
ICON_180_PATH=`pwd`/../../assets/images/cakewallet_icon_180.png
|
||||
ICON_1024_PATH=`pwd`/../../assets/images/cakewallet_icon_1024.png;;
|
||||
ICON_DIRECTORY=cakewallet_ios_icons;;
|
||||
esac
|
||||
|
||||
rm $DEST_DIR_PATH/app_icon_120.png
|
||||
rm $DEST_DIR_PATH/app_icon_180.png
|
||||
rm $DEST_DIR_PATH/app_icon_1024.png
|
||||
ln -s $ICON_120_PATH $DEST_DIR_PATH/app_icon_120.png
|
||||
ln -s $ICON_180_PATH $DEST_DIR_PATH/app_icon_180.png
|
||||
ln -s $ICON_1024_PATH $DEST_DIR_PATH/app_icon_1024.png
|
||||
ICON_2x_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon@2x.png
|
||||
ICON_2x_ipad_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon@2x~ipad.png
|
||||
ICON_3x_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon@3x.png
|
||||
ICON_20_2x_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon-20@2x.png
|
||||
ICON_20_2x_ipad_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon-20@2x~ipad.png
|
||||
ICON_20_3x_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon-20@3x.png
|
||||
ICON_20_ipad_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon-20~ipad.png
|
||||
ICON_29_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon-29.png
|
||||
ICON_29_2x_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon-29@2x.png
|
||||
ICON_29_2x_ipad_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon-29@2x~ipad.png
|
||||
ICON_29_3x_ipad_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon-29@3x.png
|
||||
ICON_29_ipad_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon-29~ipad.png
|
||||
ICON_40_2x_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon-40@2x.png
|
||||
ICON_40_2x_ipad_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon-40@2x~ipad.png
|
||||
ICON_40_3x_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon-40@3x.png
|
||||
ICON_40_ipad_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon-40~ipad.png
|
||||
ICON_60_2x_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon-60@2x~car.png
|
||||
ICON_60_3x_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon-60@3x~car.png
|
||||
ICON_83_2x_ipad_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon-83.5@2x~ipad.png
|
||||
ICON_marketing_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon~ios-marketing.png
|
||||
ICON_ipad_PATH=`pwd`/../../assets/images/ios_icons/$ICON_DIRECTORY/AppIcon~ipad.png
|
||||
|
||||
rm $DEST_DIR_PATH/AppIcon@2x.png
|
||||
rm $DEST_DIR_PATH/AppIcon@2x~ipad.png
|
||||
rm $DEST_DIR_PATH/AppIcon@3x.png
|
||||
rm $DEST_DIR_PATH/AppIcon-20@2x.png
|
||||
rm $DEST_DIR_PATH/AppIcon-20@2x~ipad.png
|
||||
rm $DEST_DIR_PATH/AppIcon-20@3x.png
|
||||
rm $DEST_DIR_PATH/AppIcon-20~ipad.png
|
||||
rm $DEST_DIR_PATH/AppIcon-29.png
|
||||
rm $DEST_DIR_PATH/AppIcon-29@2x.png
|
||||
rm $DEST_DIR_PATH/AppIcon-29@2x~ipad.png
|
||||
rm $DEST_DIR_PATH/AppIcon-29@3x.png
|
||||
rm $DEST_DIR_PATH/AppIcon-29~ipad.png
|
||||
rm $DEST_DIR_PATH/AppIcon-40@2x.png
|
||||
rm $DEST_DIR_PATH/AppIcon-40@2x~ipad.png
|
||||
rm $DEST_DIR_PATH/AppIcon-40@3x.png
|
||||
rm $DEST_DIR_PATH/AppIcon-40~ipad.png
|
||||
rm $DEST_DIR_PATH/AppIcon-60@2x~car.png
|
||||
rm $DEST_DIR_PATH/AppIcon-60@3x~car.png
|
||||
rm $DEST_DIR_PATH/AppIcon-83.5@2x~ipad.png
|
||||
rm $DEST_DIR_PATH/AppIcon~ios-marketing.png
|
||||
rm $DEST_DIR_PATH/AppIcon~ipad.png
|
||||
|
||||
ln -s $ICON_2x_PATH $DEST_DIR_PATH/AppIcon@2x.png
|
||||
ln -s $ICON_2x_ipad_PATH $DEST_DIR_PATH/AppIcon@2x~ipad.png
|
||||
ln -s $ICON_3x_PATH $DEST_DIR_PATH/AppIcon@3x.png
|
||||
ln -s $ICON_20_2x_PATH $DEST_DIR_PATH/AppIcon-20@2x.png
|
||||
ln -s $ICON_20_2x_ipad_PATH $DEST_DIR_PATH/AppIcon-20@2x~ipad.png
|
||||
ln -s $ICON_20_3x_PATH $DEST_DIR_PATH/AppIcon-20@3x.png
|
||||
ln -s $ICON_20_ipad_PATH $DEST_DIR_PATH/AppIcon-20~ipad.png
|
||||
ln -s $ICON_29_PATH $DEST_DIR_PATH/AppIcon-29.png
|
||||
ln -s $ICON_29_2x_PATH $DEST_DIR_PATH/AppIcon-29@2x.png
|
||||
ln -s $ICON_29_2x_ipad_PATH $DEST_DIR_PATH/AppIcon-29@2x~ipad.png
|
||||
ln -s $ICON_29_3x_ipad_PATH $DEST_DIR_PATH/AppIcon-29@3x.png
|
||||
ln -s $ICON_29_ipad_PATH $DEST_DIR_PATH/AppIcon-29~ipad.png
|
||||
ln -s $ICON_40_2x_PATH $DEST_DIR_PATH/AppIcon-40@2x.png
|
||||
ln -s $ICON_40_2x_ipad_PATH $DEST_DIR_PATH/AppIcon-40@2x~ipad.png
|
||||
ln -s $ICON_40_3x_PATH $DEST_DIR_PATH/AppIcon-40@3x.png
|
||||
ln -s $ICON_40_ipad_PATH $DEST_DIR_PATH/AppIcon-40~ipad.png
|
||||
ln -s $ICON_60_2x_PATH $DEST_DIR_PATH/AppIcon-60@2x~car.png
|
||||
ln -s $ICON_60_3x_PATH $DEST_DIR_PATH/AppIcon-60@3x~car.png
|
||||
ln -s $ICON_83_2x_ipad_PATH $DEST_DIR_PATH/AppIcon-83.5@2x~ipad.png
|
||||
ln -s $ICON_marketing_PATH $DEST_DIR_PATH/AppIcon~ios-marketing.png
|
||||
ln -s $ICON_ipad_PATH $DEST_DIR_PATH/AppIcon~ipad.png
|
||||
|
|