mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
v6.1.0 Release Candidate (#3178)
* v6.1.0 Release Candidate * add copy indicator on tx details screen (#3152) * initial remove wownero (#3180) * fix: minor fix to the backupSeeds (#3181) * add isSensitive to copy indicator (#3183) * add copy indicator on tx details screen * add isSensitive field * fix: add "support for coin removed" to exception handler ignored list (#3182) * CW-1273: Implement USDT0 Bridge (#2855) * feat: Implement USDT0 Bridging using OFT Standard by Layer Zero. POC available in apps menu. * feat: Implement USDT0 Bridging using OFT Standard by Layer Zero. POC available in apps menu. * feat: Implement USDT0 Bridging using OFT Standard by Layer Zero. POC available in apps menu. * Add transaction history and status polling for USDT0 bridging * Add Transaction history and status polling for USDT0 Bridging * USDT0 Bridging Implementation * Update Arbitrum USDT token symbol * fix: Merge conflicts * fix: Merge conflicts * chore: Rever formatting * feat: Implement new flow * feat: Implement new ui flow * Add currency to configure * feat: new ui flow * Update USDT0 implementation - Switch to sqlite for storage instead of hive - Switch bridge history and details to modals - Switch bridge transfer details page to new tx details ui * refactor: rearrange modal action buttons * enhance usdt0 bridge flows * Update lib/entities/wallet_manager.dart [skip ci] --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com> * v6.1.0 Release Candidate * fix lag on saving frozen coin status (#3164) * fix lag on saving frozen coin status * wrap saveUnspentCoinInfo in @action * revert fix + safeguard coin control page * v6.1.0 Release Candidate * v6.1.0 Release Candidate [skip ci] * v6.1.0 Release Candidate [skip ci] --------- Co-authored-by: malik1004x <malikowskirobert@gmail.com> Co-authored-by: cyan <cyjan@mrcyjanek.net> Co-authored-by: David Adegoke <64401859+Blazebrain@users.noreply.github.com>
This commit is contained in:
co-authored by
malik1004x
cyan
David Adegoke
parent
eeb44045ef
commit
0e92111d93
@@ -65,15 +65,15 @@ class KryptonimBuyProvider extends BuyProvider {
|
||||
'Authorization': _kryptonimApiKey,
|
||||
};
|
||||
|
||||
final body = jsonEncode({
|
||||
'amount': amount,
|
||||
'currency': fiatCurrency,
|
||||
'converted_currency': cryptoCurrency.title,
|
||||
'blockchain': _normalizeBlockChain(cryptoCurrency),
|
||||
'quote_currency': fiatCurrency,
|
||||
});
|
||||
|
||||
try {
|
||||
final body = jsonEncode({
|
||||
'amount': amount,
|
||||
'currency': fiatCurrency,
|
||||
'converted_currency': cryptoCurrency.title,
|
||||
'blockchain': _normalizeBlockChain(cryptoCurrency),
|
||||
'quote_currency': fiatCurrency,
|
||||
});
|
||||
|
||||
final response = await ProxyWrapper().post(
|
||||
clearnetUri: url,
|
||||
headers: headers,
|
||||
|
||||
@@ -17,21 +17,17 @@ import 'package:cake_wallet/exchange/trade.dart';
|
||||
import 'package:cake_wallet/monero/monero.dart';
|
||||
import 'package:cake_wallet/wownero/wownero.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:cw_core/db/sqlite.dart';
|
||||
import 'package:cw_core/node.dart';
|
||||
import 'package:cake_wallet/entities/sync_status_display_mode.dart';
|
||||
import 'package:cake_wallet/wownero/wownero.dart';
|
||||
import 'package:cw_core/pathForWallet.dart';
|
||||
import 'package:cw_core/root_dir.dart';
|
||||
import 'package:cw_core/spl_token.dart';
|
||||
import 'package:cw_core/utils/print_verbose.dart';
|
||||
import 'package:cw_core/wallet_info.dart';
|
||||
import 'package:cw_core/wallet_type.dart';
|
||||
import 'package:cake_wallet/exchange/trade.dart';
|
||||
import 'package:encrypt/encrypt.dart' as encrypt;
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:cw_core/cake_hive.dart';
|
||||
import 'package:cw_core/erc20_token.dart';
|
||||
|
||||
@@ -617,6 +613,16 @@ Future<void> defaultSettingsMigration(
|
||||
break;
|
||||
case 64:
|
||||
await _backupWowneroSeeds(havenSeedStore);
|
||||
_changeExchangeProviderAvailability(
|
||||
sharedPreferences,
|
||||
providerName: "LetsExchange",
|
||||
enabled: false,
|
||||
);
|
||||
await _changeExchangeProviderAvailability(
|
||||
sharedPreferences,
|
||||
providerName: "Swaps.XYZ",
|
||||
enabled: true,
|
||||
);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -192,7 +192,7 @@ class SwapTradeExchangeProvider extends ExchangeProvider {
|
||||
'amount_send': request.fromAmount,
|
||||
'recipient': request.toAddress,
|
||||
'ref': 'cake',
|
||||
'markup': int.tryParse(markup.toString()) ?? 0,
|
||||
'markup': double.tryParse(markup.toString()) ?? 0,
|
||||
'refund_address': request.refundAddress,
|
||||
};
|
||||
|
||||
|
||||
@@ -7,13 +7,21 @@ import 'package:cake_wallet/exchange/trade.dart';
|
||||
import 'package:cake_wallet/exchange/trade_not_created_exception.dart';
|
||||
import 'package:cake_wallet/exchange/trade_request.dart';
|
||||
import 'package:cake_wallet/exchange/trade_state.dart';
|
||||
import 'package:cake_wallet/exchange/utils/currency_pairs_utils.dart';
|
||||
import 'package:cake_wallet/utils/package_info.dart';
|
||||
import 'package:cw_core/crypto_currency.dart';
|
||||
import 'package:cw_core/utils/print_verbose.dart';
|
||||
import 'package:cw_core/utils/proxy_wrapper.dart';
|
||||
import 'package:cake_wallet/utils/exchange_provider_logger.dart';
|
||||
class XOSwapExchangeProvider extends ExchangeProvider {
|
||||
XOSwapExchangeProvider();
|
||||
XOSwapExchangeProvider() {
|
||||
_addAppVersionHeader();
|
||||
}
|
||||
|
||||
void _addAppVersionHeader() async {
|
||||
final packageInfo = await PackageInfo.fromPlatform();
|
||||
final currentVersion = packageInfo.version;
|
||||
_headers['App-Version'] = currentVersion;
|
||||
}
|
||||
|
||||
static const _apiAuthority = 'exchange.exodus.io';
|
||||
static const _apiPath = '/v3';
|
||||
@@ -22,7 +30,7 @@ class XOSwapExchangeProvider extends ExchangeProvider {
|
||||
static const _orders = '/orders';
|
||||
static const _assets = '/assets';
|
||||
|
||||
static const _headers = {'Content-Type': 'application/json', 'App-Name': 'cake-labs'};
|
||||
static final _headers = {'Content-Type': 'application/json', 'App-Name': 'cake-labs'};
|
||||
|
||||
final _networks = <String, String>{
|
||||
'POL': 'matic',
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'dart:async';
|
||||
import 'package:cake_wallet/entities/new_ui_entities/list_item/list_item_text_field.dart';
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
import 'package:cake_wallet/new-ui/widgets/new_primary_button.dart';
|
||||
@@ -7,7 +6,6 @@ import 'package:cake_wallet/src/widgets/new_list_row/new_list_section.dart';
|
||||
import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_edit_or_create_view_model.dart';
|
||||
import 'package:cw_core/utils/print_verbose.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||
import 'package:mobx/mobx.dart';
|
||||
|
||||
@@ -37,7 +35,9 @@ class _ReceiveLabelModalState extends State<ReceiveLabelModal> {
|
||||
printV(state);
|
||||
if (state is AddressSavedSuccessfully) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
Navigator.of(context).pop(widget.walletAddressEditOrCreateViewModel.label);
|
||||
if (mounted && Navigator.canPop(context)) {
|
||||
Navigator.of(context).pop(widget.walletAddressEditOrCreateViewModel.label);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -130,7 +130,7 @@ class _RescanPageState extends State<RescanPage> {
|
||||
}
|
||||
|
||||
Future<void> _toggleSilentPaymentsScanning(BuildContext context) async {
|
||||
final height = int.parse(_heightController.text);
|
||||
final height = int.tryParse(_heightController.text) ?? 0;
|
||||
|
||||
Navigator.of(context).pop();
|
||||
|
||||
|
||||
@@ -63,8 +63,13 @@ class BlockchainHeightState extends State<BlockchainHeightWidget> {
|
||||
dateController.text = '';
|
||||
}
|
||||
try {
|
||||
_changeHeight(
|
||||
restoreHeightController.text.isNotEmpty ? int.parse(restoreHeightController.text) : 0);
|
||||
final int _height;
|
||||
if (restoreHeightController.text.isNotEmpty) {
|
||||
_height = int.tryParse(restoreHeightController.text) ?? 0;
|
||||
} else {
|
||||
_height = 0;
|
||||
}
|
||||
_changeHeight(_height);
|
||||
} catch (_) {
|
||||
_changeHeight(0);
|
||||
}
|
||||
|
||||
@@ -295,6 +295,7 @@ class ExceptionHandler {
|
||||
"core/key_service.dart:14",
|
||||
"Wallet is null",
|
||||
"Wrong Device Status: 0x5515 (UNKNOWN)",
|
||||
"Command handling failed. With error: hostUnreachable",
|
||||
|
||||
"FocusScopeNode was used after being disposed",
|
||||
"_getDismissibleFlushbar",
|
||||
|
||||
@@ -272,12 +272,12 @@ class TokenUtilities {
|
||||
if (isPotentialEVM) {
|
||||
// Try by tag first if available (e.g., 'POL', 'BASE', 'ARB')
|
||||
if (tag != null) {
|
||||
final chainId = evm!.getChainIdByTag(tag);
|
||||
final chainId = evm?.getChainIdByTag(tag);
|
||||
if (chainId != null) return chainId;
|
||||
}
|
||||
|
||||
// Try by title (case-insensitive)
|
||||
final titleChainId = evm!.getChainIdByTitle(title);
|
||||
final titleChainId = evm?.getChainIdByTitle(title);
|
||||
if (titleChainId != null) return titleChainId;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import 'package:cake_wallet/store/dashboard/fiat_conversion_store.dart';
|
||||
import 'package:cake_wallet/store/settings_store.dart';
|
||||
import 'package:cw_core/crypto_currency.dart';
|
||||
import 'package:cw_core/erc20_token.dart';
|
||||
import 'package:cw_core/transaction_priority.dart';
|
||||
import 'package:cw_core/wallet_base.dart';
|
||||
import 'package:cw_core/wallet_info.dart';
|
||||
import 'package:cw_core/utils/print_verbose.dart';
|
||||
@@ -310,8 +309,7 @@ abstract class BridgeViewModelBase extends WalletChangeListenerViewModel with St
|
||||
BigInt get selectedTokenBalance {
|
||||
final bal = wallet.balance[selectedToken];
|
||||
|
||||
if (bal is EVMChainERC20Balance) return bal.balance;
|
||||
return BigInt.zero;
|
||||
return bal?.available ?? BigInt.zero;
|
||||
}
|
||||
|
||||
@computed
|
||||
@@ -477,7 +475,7 @@ abstract class BridgeViewModelBase extends WalletChangeListenerViewModel with St
|
||||
isExecuting = true;
|
||||
executeError = null;
|
||||
try {
|
||||
final priority = EVMChainTransactionPriority.medium;
|
||||
final priority = evm!.getDefaultTransactionPriority();
|
||||
final pending = await evm!.executeUSDT0Transfer(
|
||||
wallet: wallet,
|
||||
token: token,
|
||||
@@ -486,7 +484,7 @@ abstract class BridgeViewModelBase extends WalletChangeListenerViewModel with St
|
||||
amount: amountBigInt,
|
||||
recipientAddress: recipientAddress.trim(),
|
||||
quote: quote!,
|
||||
priority: priority as TransactionPriority,
|
||||
priority: priority,
|
||||
useBlinkProtection: canSupportBlinkProtection(src),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user