mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-18 00:34:58 +00:00
Merge branch 'main' of https://github.com/cake-tech/cake_wallet into mweb
This commit is contained in:
commit
e05b06eefc
51 changed files with 208 additions and 159 deletions
|
@ -1,2 +1,3 @@
|
|||
Monero enhancements
|
||||
Synchronization improvements
|
||||
Bug fixes
|
|
@ -1,3 +1,5 @@
|
|||
Monero enhancements
|
||||
Improvements for Tron and Nano wallets
|
||||
Monero and Ethereum enhancements
|
||||
Synchronization improvements
|
||||
Exchange flow enhancements
|
||||
Ledger improvements
|
||||
Bug fixes
|
|
@ -574,10 +574,9 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store {
|
|||
}
|
||||
|
||||
void _validateAddresses() {
|
||||
allAddresses.forEach((element) {
|
||||
if (!element.isHidden &&
|
||||
element.address !=
|
||||
getAddress(index: element.index, hd: mainHd, addressType: element.type)) {
|
||||
_addresses.forEach((element) {
|
||||
if (!element.isHidden && element.address !=
|
||||
getAddress(index: element.index, hd: mainHd, addressType: element.type)) {
|
||||
element.isHidden = true;
|
||||
} else if (element.isHidden &&
|
||||
element.address !=
|
||||
|
|
|
@ -72,12 +72,12 @@ abstract class EVMChainClient {
|
|||
}
|
||||
}
|
||||
|
||||
Future<int> getGasBaseFee() async {
|
||||
Future<int?> getGasBaseFee() async {
|
||||
try {
|
||||
final blockInfo = await _client!.getBlockInformation(isContainFullObj: false);
|
||||
final baseFee = blockInfo.baseFeePerGas;
|
||||
|
||||
return baseFee!.getInWei.toInt();
|
||||
return baseFee?.getInWei.toInt();
|
||||
} catch (_) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -110,19 +110,19 @@ abstract class EVMChainClient {
|
|||
EthereumAddress.fromHex(contractAddress),
|
||||
);
|
||||
|
||||
final transferFunction = contract.function('transferFrom');
|
||||
final transfer = contract.function('transfer');
|
||||
|
||||
final estimatedGas = await _client!.estimateGas(
|
||||
// Estimate gas units
|
||||
final gasEstimate = await _client!.estimateGas(
|
||||
sender: senderAddress,
|
||||
to: toAddress,
|
||||
value: value,
|
||||
data: transferFunction.encodeCall([
|
||||
senderAddress,
|
||||
to: EthereumAddress.fromHex(contractAddress),
|
||||
data: transfer.encodeCall([
|
||||
toAddress,
|
||||
value.getInWei,
|
||||
]),
|
||||
);
|
||||
return estimatedGas.toInt();
|
||||
|
||||
return gasEstimate.toInt();
|
||||
}
|
||||
} catch (_) {
|
||||
return 0;
|
||||
|
|
|
@ -387,8 +387,6 @@ abstract class EVMChainWalletBase
|
|||
|
||||
estimatedFeesForTransaction = BigInt.from(estimateFees);
|
||||
|
||||
debugPrint('Estimated Fees for Transaction: $estimatedFeesForTransaction');
|
||||
|
||||
if (output.sendAll && transactionCurrency is! Erc20Token) {
|
||||
totalAmount = (erc20Balance.balance - estimatedFeesForTransaction);
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ final monero.WalletManager wmPtr = Pointer.fromAddress((() {
|
|||
print("ptr: $_wmPtr");
|
||||
} catch (e) {
|
||||
print(e);
|
||||
rethrow;
|
||||
}
|
||||
return _wmPtr!.address;
|
||||
})());
|
||||
|
|
|
@ -21,6 +21,7 @@ final wownero.WalletManager wmPtr = Pointer.fromAddress((() {
|
|||
print("ptr: $_wmPtr");
|
||||
} catch (e) {
|
||||
print(e);
|
||||
rethrow;
|
||||
}
|
||||
return _wmPtr!.address;
|
||||
})());
|
||||
|
|
|
@ -8,36 +8,6 @@ PODS:
|
|||
- Flutter
|
||||
- ReachabilitySwift
|
||||
- CryptoSwift (1.8.2)
|
||||
- cw_haven (0.0.1):
|
||||
- cw_haven/Boost (= 0.0.1)
|
||||
- cw_haven/Haven (= 0.0.1)
|
||||
- cw_haven/OpenSSL (= 0.0.1)
|
||||
- cw_haven/Sodium (= 0.0.1)
|
||||
- cw_shared_external
|
||||
- Flutter
|
||||
- cw_haven/Boost (0.0.1):
|
||||
- cw_shared_external
|
||||
- Flutter
|
||||
- cw_haven/Haven (0.0.1):
|
||||
- cw_shared_external
|
||||
- Flutter
|
||||
- cw_haven/OpenSSL (0.0.1):
|
||||
- cw_shared_external
|
||||
- Flutter
|
||||
- cw_haven/Sodium (0.0.1):
|
||||
- cw_shared_external
|
||||
- Flutter
|
||||
- cw_shared_external (0.0.1):
|
||||
- cw_shared_external/Boost (= 0.0.1)
|
||||
- cw_shared_external/OpenSSL (= 0.0.1)
|
||||
- cw_shared_external/Sodium (= 0.0.1)
|
||||
- Flutter
|
||||
- cw_shared_external/Boost (0.0.1):
|
||||
- Flutter
|
||||
- cw_shared_external/OpenSSL (0.0.1):
|
||||
- Flutter
|
||||
- cw_shared_external/Sodium (0.0.1):
|
||||
- Flutter
|
||||
- device_display_brightness (0.0.1):
|
||||
- Flutter
|
||||
- device_info_plus (0.0.1):
|
||||
|
@ -124,8 +94,6 @@ PODS:
|
|||
- shared_preferences_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sp_scanner (0.0.1):
|
||||
- Flutter
|
||||
- SwiftProtobuf (1.26.0)
|
||||
- SwiftyGif (5.4.5)
|
||||
- Toast (4.1.1)
|
||||
|
@ -145,8 +113,6 @@ DEPENDENCIES:
|
|||
- barcode_scan2 (from `.symlinks/plugins/barcode_scan2/ios`)
|
||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
|
||||
- CryptoSwift
|
||||
- cw_haven (from `.symlinks/plugins/cw_haven/ios`)
|
||||
- cw_shared_external (from `.symlinks/plugins/cw_shared_external/ios`)
|
||||
- device_display_brightness (from `.symlinks/plugins/device_display_brightness/ios`)
|
||||
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
||||
- devicelocale (from `.symlinks/plugins/devicelocale/ios`)
|
||||
|
@ -166,7 +132,6 @@ DEPENDENCIES:
|
|||
- sensitive_clipboard (from `.symlinks/plugins/sensitive_clipboard/ios`)
|
||||
- share_plus (from `.symlinks/plugins/share_plus/ios`)
|
||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||
- sp_scanner (from `.symlinks/plugins/sp_scanner/ios`)
|
||||
- uni_links (from `.symlinks/plugins/uni_links/ios`)
|
||||
- UnstoppableDomainsResolution (~> 4.0.0)
|
||||
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||
|
@ -194,10 +159,6 @@ EXTERNAL SOURCES:
|
|||
:path: ".symlinks/plugins/barcode_scan2/ios"
|
||||
connectivity_plus:
|
||||
:path: ".symlinks/plugins/connectivity_plus/ios"
|
||||
cw_haven:
|
||||
:path: ".symlinks/plugins/cw_haven/ios"
|
||||
cw_shared_external:
|
||||
:path: ".symlinks/plugins/cw_shared_external/ios"
|
||||
device_display_brightness:
|
||||
:path: ".symlinks/plugins/device_display_brightness/ios"
|
||||
device_info_plus:
|
||||
|
@ -236,8 +197,6 @@ EXTERNAL SOURCES:
|
|||
:path: ".symlinks/plugins/share_plus/ios"
|
||||
shared_preferences_foundation:
|
||||
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
||||
sp_scanner:
|
||||
:path: ".symlinks/plugins/sp_scanner/ios"
|
||||
uni_links:
|
||||
:path: ".symlinks/plugins/uni_links/ios"
|
||||
url_launcher_ios:
|
||||
|
@ -252,8 +211,6 @@ SPEC CHECKSUMS:
|
|||
BigInt: f668a80089607f521586bbe29513d708491ef2f7
|
||||
connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d
|
||||
CryptoSwift: c63a805d8bb5e5538e88af4e44bb537776af11ea
|
||||
cw_haven: b3e54e1fbe7b8e6fda57a93206bc38f8e89b898a
|
||||
cw_shared_external: 2972d872b8917603478117c9957dfca611845a92
|
||||
device_display_brightness: 1510e72c567a1f6ce6ffe393dcd9afd1426034f7
|
||||
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
|
||||
devicelocale: b22617f40038496deffba44747101255cee005b0
|
||||
|
@ -280,7 +237,6 @@ SPEC CHECKSUMS:
|
|||
sensitive_clipboard: d4866e5d176581536c27bb1618642ee83adca986
|
||||
share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
|
||||
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
|
||||
sp_scanner: eaa617fa827396b967116b7f1f43549ca62e9a12
|
||||
SwiftProtobuf: 5e8349171e7c2f88f5b9e683cb3cb79d1dc780b3
|
||||
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
|
||||
Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e
|
||||
|
|
|
@ -391,7 +391,14 @@ Future<void> ios_migrate_trades_list(Box<Trade> tradeSource) async {
|
|||
}
|
||||
|
||||
return Trade(
|
||||
id: tradeId, provider: provider!, from: from, to: to, createdAt: date, amount: '');
|
||||
id: tradeId,
|
||||
provider: provider!,
|
||||
from: from,
|
||||
to: to,
|
||||
createdAt: date,
|
||||
amount: '',
|
||||
receiveAmount: '',
|
||||
);
|
||||
});
|
||||
await tradeSource.addAll(trades);
|
||||
await prefs.setBool('ios_migration_trade_list_completed', true);
|
||||
|
|
|
@ -194,20 +194,24 @@ class ChangeNowExchangeProvider extends ExchangeProvider {
|
|||
final refundAddress = responseJSON['refundAddress'] as String;
|
||||
final extraId = responseJSON['payinExtraId'] as String?;
|
||||
final payoutAddress = responseJSON['payoutAddress'] as String;
|
||||
final fromAmount = responseJSON['fromAmount']?.toString();
|
||||
final toAmount = responseJSON['toAmount']?.toString();
|
||||
|
||||
return Trade(
|
||||
id: id,
|
||||
from: request.fromCurrency,
|
||||
to: request.toCurrency,
|
||||
provider: description,
|
||||
inputAddress: inputAddress,
|
||||
refundAddress: refundAddress,
|
||||
extraId: extraId,
|
||||
createdAt: DateTime.now(),
|
||||
amount: responseJSON['fromAmount']?.toString() ?? request.fromAmount,
|
||||
state: TradeState.created,
|
||||
payoutAddress: payoutAddress,
|
||||
isSendAll: isSendAll);
|
||||
id: id,
|
||||
from: request.fromCurrency,
|
||||
to: request.toCurrency,
|
||||
provider: description,
|
||||
inputAddress: inputAddress,
|
||||
refundAddress: refundAddress,
|
||||
extraId: extraId,
|
||||
createdAt: DateTime.now(),
|
||||
amount: fromAmount ?? request.fromAmount,
|
||||
receiveAmount: toAmount ?? request.toAmount,
|
||||
state: TradeState.created,
|
||||
payoutAddress: payoutAddress,
|
||||
isSendAll: isSendAll,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -172,20 +172,23 @@ class ExolixExchangeProvider extends ExchangeProvider {
|
|||
final extraId = responseJSON['depositExtraId'] as String?;
|
||||
final payoutAddress = responseJSON['withdrawalAddress'] as String;
|
||||
final amount = responseJSON['amount'].toString();
|
||||
final receiveAmount = responseJSON['amountTo']?.toString();
|
||||
|
||||
return Trade(
|
||||
id: id,
|
||||
from: request.fromCurrency,
|
||||
to: request.toCurrency,
|
||||
provider: description,
|
||||
inputAddress: inputAddress,
|
||||
refundAddress: refundAddress,
|
||||
extraId: extraId,
|
||||
createdAt: DateTime.now(),
|
||||
amount: amount,
|
||||
state: TradeState.created,
|
||||
payoutAddress: payoutAddress,
|
||||
isSendAll: isSendAll);
|
||||
id: id,
|
||||
from: request.fromCurrency,
|
||||
to: request.toCurrency,
|
||||
provider: description,
|
||||
inputAddress: inputAddress,
|
||||
refundAddress: refundAddress,
|
||||
extraId: extraId,
|
||||
createdAt: DateTime.now(),
|
||||
amount: amount,
|
||||
receiveAmount:receiveAmount ?? request.toAmount,
|
||||
state: TradeState.created,
|
||||
payoutAddress: payoutAddress,
|
||||
isSendAll: isSendAll,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -162,11 +162,13 @@ class QuantexExchangeProvider extends ExchangeProvider {
|
|||
throw Exception('Unexpected http status: ${response.statusCode}');
|
||||
|
||||
final responseData = responseBody['data'] as Map<String, dynamic>;
|
||||
final receiveAmount = responseData["amount_receive"]?.toString();
|
||||
|
||||
return Trade(
|
||||
id: responseData["order_id"] as String,
|
||||
inputAddress: responseData["server_address"] as String,
|
||||
amount: request.fromAmount,
|
||||
receiveAmount: receiveAmount ?? request.toAmount,
|
||||
from: request.fromCurrency,
|
||||
to: request.toCurrency,
|
||||
provider: description,
|
||||
|
|
|
@ -213,6 +213,7 @@ class SideShiftExchangeProvider extends ExchangeProvider {
|
|||
refundAddress: settleAddress,
|
||||
state: TradeState.created,
|
||||
amount: depositAmount ?? request.fromAmount,
|
||||
receiveAmount: request.toAmount,
|
||||
payoutAddress: settleAddress,
|
||||
createdAt: DateTime.now(),
|
||||
isSendAll: isSendAll,
|
||||
|
|
|
@ -153,6 +153,7 @@ class SimpleSwapExchangeProvider extends ExchangeProvider {
|
|||
final payoutAddress = responseJSON['address_to'] as String;
|
||||
final settleAddress = responseJSON['user_refund_address'] as String;
|
||||
final extraId = responseJSON['extra_id_from'] as String?;
|
||||
final receiveAmount = responseJSON['amount_to'] as String?;
|
||||
|
||||
return Trade(
|
||||
id: id,
|
||||
|
@ -164,6 +165,7 @@ class SimpleSwapExchangeProvider extends ExchangeProvider {
|
|||
extraId: extraId,
|
||||
state: TradeState.created,
|
||||
amount: request.fromAmount,
|
||||
receiveAmount: receiveAmount ?? request.toAmount,
|
||||
payoutAddress: payoutAddress,
|
||||
createdAt: DateTime.now(),
|
||||
isSendAll: isSendAll,
|
||||
|
|
|
@ -40,7 +40,7 @@ class ThorChainExchangeProvider extends ExchangeProvider {
|
|||
static const _txInfoPath = '/thorchain/tx/status/';
|
||||
static const _affiliateName = 'cakewallet';
|
||||
static const _affiliateBps = '175';
|
||||
static const _nameLookUpPath= 'v2/thorname/lookup/';
|
||||
static const _nameLookUpPath = 'v2/thorname/lookup/';
|
||||
|
||||
final Box<Trade> tradesStore;
|
||||
|
||||
|
@ -137,19 +137,27 @@ class ThorChainExchangeProvider extends ExchangeProvider {
|
|||
|
||||
final inputAddress = responseJSON['inbound_address'] as String?;
|
||||
final memo = responseJSON['memo'] as String?;
|
||||
final directAmountOutResponse = responseJSON['expected_amount_out'] as String?;
|
||||
|
||||
String? receiveAmount;
|
||||
if (directAmountOutResponse != null) {
|
||||
receiveAmount = _thorChainAmountToDouble(directAmountOutResponse).toString();
|
||||
}
|
||||
|
||||
return Trade(
|
||||
id: '',
|
||||
from: request.fromCurrency,
|
||||
to: request.toCurrency,
|
||||
provider: description,
|
||||
inputAddress: inputAddress,
|
||||
createdAt: DateTime.now(),
|
||||
amount: request.fromAmount,
|
||||
state: TradeState.notFound,
|
||||
payoutAddress: request.toAddress,
|
||||
memo: memo,
|
||||
isSendAll: isSendAll);
|
||||
id: '',
|
||||
from: request.fromCurrency,
|
||||
to: request.toCurrency,
|
||||
provider: description,
|
||||
inputAddress: inputAddress,
|
||||
createdAt: DateTime.now(),
|
||||
amount: request.fromAmount,
|
||||
receiveAmount: receiveAmount ?? request.toAmount,
|
||||
state: TradeState.notFound,
|
||||
payoutAddress: request.toAddress,
|
||||
memo: memo,
|
||||
isSendAll: isSendAll,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -234,7 +242,6 @@ class ThorChainExchangeProvider extends ExchangeProvider {
|
|||
return chainToAddressMap;
|
||||
}
|
||||
|
||||
|
||||
Future<Map<String, dynamic>> _getSwapQuote(Map<String, String> params) async {
|
||||
Uri uri = Uri.https(_baseNodeURL, _quotePath, params);
|
||||
|
||||
|
|
|
@ -224,22 +224,26 @@ class TrocadorExchangeProvider extends ExchangeProvider {
|
|||
final password = responseJSON['password'] as String;
|
||||
final providerId = responseJSON['id_provider'] as String;
|
||||
final providerName = responseJSON['provider'] as String;
|
||||
final amount = responseJSON['amount_from']?.toString();
|
||||
final receiveAmount = responseJSON['amount_to']?.toString();
|
||||
|
||||
return Trade(
|
||||
id: id,
|
||||
from: request.fromCurrency,
|
||||
to: request.toCurrency,
|
||||
provider: description,
|
||||
inputAddress: inputAddress,
|
||||
refundAddress: refundAddress,
|
||||
state: TradeState.deserialize(raw: status),
|
||||
password: password,
|
||||
providerId: providerId,
|
||||
providerName: providerName,
|
||||
createdAt: DateTime.tryParse(date)?.toLocal(),
|
||||
amount: responseJSON['amount_from']?.toString() ?? request.fromAmount,
|
||||
payoutAddress: payoutAddress,
|
||||
isSendAll: isSendAll);
|
||||
id: id,
|
||||
from: request.fromCurrency,
|
||||
to: request.toCurrency,
|
||||
provider: description,
|
||||
inputAddress: inputAddress,
|
||||
refundAddress: refundAddress,
|
||||
state: TradeState.deserialize(raw: status),
|
||||
password: password,
|
||||
providerId: providerId,
|
||||
providerName: providerName,
|
||||
createdAt: DateTime.tryParse(date)?.toLocal(),
|
||||
amount: amount ?? request.fromAmount,
|
||||
receiveAmount: receiveAmount ?? request.toAmount,
|
||||
payoutAddress: payoutAddress,
|
||||
isSendAll: isSendAll,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -13,6 +13,7 @@ class Trade extends HiveObject {
|
|||
CryptoCurrency? from,
|
||||
CryptoCurrency? to,
|
||||
TradeState? state,
|
||||
this.receiveAmount,
|
||||
this.createdAt,
|
||||
this.expiredAt,
|
||||
this.inputAddress,
|
||||
|
@ -122,6 +123,9 @@ class Trade extends HiveObject {
|
|||
@HiveField(22)
|
||||
String? router;
|
||||
|
||||
@HiveField(23, defaultValue: '')
|
||||
String? receiveAmount;
|
||||
|
||||
static Trade fromMap(Map<String, Object?> map) {
|
||||
return Trade(
|
||||
id: map['id'] as String,
|
||||
|
@ -131,6 +135,7 @@ class Trade extends HiveObject {
|
|||
createdAt:
|
||||
map['date'] != null ? DateTime.fromMillisecondsSinceEpoch(map['date'] as int) : null,
|
||||
amount: map['amount'] as String,
|
||||
receiveAmount: map['receive_amount'] as String?,
|
||||
walletId: map['wallet_id'] as String,
|
||||
fromWalletAddress: map['from_wallet_address'] as String?,
|
||||
memo: map['memo'] as String?,
|
||||
|
@ -149,6 +154,7 @@ class Trade extends HiveObject {
|
|||
'output': to.serialize(),
|
||||
'date': createdAt != null ? createdAt!.millisecondsSinceEpoch : null,
|
||||
'amount': amount,
|
||||
'receive_amount': receiveAmount,
|
||||
'wallet_id': walletId,
|
||||
'from_wallet_address': fromWalletAddress,
|
||||
'memo': memo,
|
||||
|
@ -179,6 +185,7 @@ class TradeAdapter extends TypeAdapter<Trade> {
|
|||
return Trade(
|
||||
id: fields[0] == null ? '' : fields[0] as String,
|
||||
amount: fields[7] == null ? '' : fields[7] as String,
|
||||
receiveAmount: fields[23] as String?,
|
||||
createdAt: fields[5] as DateTime?,
|
||||
expiredAt: fields[6] as DateTime?,
|
||||
inputAddress: fields[8] as String?,
|
||||
|
@ -206,7 +213,7 @@ class TradeAdapter extends TypeAdapter<Trade> {
|
|||
@override
|
||||
void write(BinaryWriter writer, Trade obj) {
|
||||
writer
|
||||
..writeByte(23)
|
||||
..writeByte(24)
|
||||
..writeByte(0)
|
||||
..write(obj.id)
|
||||
..writeByte(1)
|
||||
|
@ -252,7 +259,9 @@ class TradeAdapter extends TypeAdapter<Trade> {
|
|||
..writeByte(21)
|
||||
..write(obj.isSendAll)
|
||||
..writeByte(22)
|
||||
..write(obj.router);
|
||||
..write(obj.router)
|
||||
..writeByte(23)
|
||||
..write(obj.receiveAmount);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -147,8 +147,13 @@ abstract class ExchangeTradeViewModelBase with Store {
|
|||
items.clear();
|
||||
|
||||
if (trade.provider != ExchangeProviderDescription.thorChain)
|
||||
items.add(ExchangeTradeItem(
|
||||
title: "${trade.provider.title} ${S.current.id}", data: '${trade.id}', isCopied: true));
|
||||
items.add(
|
||||
ExchangeTradeItem(
|
||||
title: "${trade.provider.title} ${S.current.id}",
|
||||
data: '${trade.id}',
|
||||
isCopied: true,
|
||||
),
|
||||
);
|
||||
|
||||
if (trade.extraId != null) {
|
||||
final title = trade.from == CryptoCurrency.xrp
|
||||
|
@ -161,15 +166,26 @@ abstract class ExchangeTradeViewModelBase with Store {
|
|||
}
|
||||
|
||||
items.addAll([
|
||||
ExchangeTradeItem(title: S.current.amount, data: '${trade.amount}', isCopied: true),
|
||||
ExchangeTradeItem(
|
||||
title: S.current.send_to_this_address('${tradesStore.trade!.from}', tagFrom) + ':',
|
||||
data: trade.inputAddress ?? '',
|
||||
isCopied: true),
|
||||
title: S.current.amount,
|
||||
data: '${trade.amount} ${trade.from}',
|
||||
isCopied: true,
|
||||
),
|
||||
ExchangeTradeItem(
|
||||
title: S.current.arrive_in_this_address('${tradesStore.trade!.to}', tagTo) + ':',
|
||||
data: trade.payoutAddress ?? '',
|
||||
isCopied: true),
|
||||
title: S.current.estimated_receive_amount +':',
|
||||
data: '${tradesStore.trade?.receiveAmount} ${trade.to}',
|
||||
isCopied: true,
|
||||
),
|
||||
ExchangeTradeItem(
|
||||
title: S.current.send_to_this_address('${tradesStore.trade!.from}', tagFrom) + ':',
|
||||
data: trade.inputAddress ?? '',
|
||||
isCopied: true,
|
||||
),
|
||||
ExchangeTradeItem(
|
||||
title: S.current.arrive_in_this_address('${tradesStore.trade!.to}', tagTo) + ':',
|
||||
data: trade.payoutAddress ?? '',
|
||||
isCopied: true,
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -450,19 +450,21 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with
|
|||
double? highestMax = 0.0;
|
||||
|
||||
try {
|
||||
final result = await Future.wait(selectedProviders
|
||||
.where((element) => providersForCurrentPair().contains(provider))
|
||||
.map((provider) => provider
|
||||
.fetchLimits(
|
||||
from: from,
|
||||
to: to,
|
||||
isFixedRateMode: isFixedRateMode,
|
||||
)
|
||||
.onError((error, stackTrace) => Limits(max: 0.0, min: double.maxFinite))
|
||||
.timeout(
|
||||
Duration(seconds: 7),
|
||||
onTimeout: () => Limits(max: 0.0, min: double.maxFinite),
|
||||
)));
|
||||
final result = await Future.wait(
|
||||
selectedProviders.where((provider) => providersForCurrentPair().contains(provider)).map(
|
||||
(provider) => provider
|
||||
.fetchLimits(
|
||||
from: from,
|
||||
to: to,
|
||||
isFixedRateMode: isFixedRateMode,
|
||||
)
|
||||
.onError((error, stackTrace) => Limits(max: 0.0, min: double.maxFinite))
|
||||
.timeout(
|
||||
Duration(seconds: 7),
|
||||
onTimeout: () => Limits(max: 0.0, min: double.maxFinite),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
result.forEach((tempLimits) {
|
||||
if (lowestMin != null && (tempLimits.min ?? -1) < lowestMin!) {
|
||||
|
@ -506,17 +508,24 @@ abstract class ExchangeViewModelBase extends WalletChangeListenerViewModel with
|
|||
}
|
||||
|
||||
try {
|
||||
for (var provider in _sortedAvailableProviders.values) {
|
||||
for (var i = 0; i < _sortedAvailableProviders.values.length; i++) {
|
||||
final provider = _sortedAvailableProviders.values.toList()[i];
|
||||
final providerRate = _sortedAvailableProviders.keys.toList()[i];
|
||||
|
||||
if (!(await provider.checkIsAvailable())) continue;
|
||||
|
||||
_bestRate = providerRate;
|
||||
await changeDepositAmount(amount: depositAmount);
|
||||
|
||||
final request = TradeRequest(
|
||||
fromCurrency: depositCurrency,
|
||||
toCurrency: receiveCurrency,
|
||||
fromAmount: depositAmount.replaceAll(',', '.'),
|
||||
toAmount: receiveAmount.replaceAll(',', '.'),
|
||||
refundAddress: depositAddress,
|
||||
toAddress: receiveAddress,
|
||||
isFixedRate: isFixedRateMode);
|
||||
fromCurrency: depositCurrency,
|
||||
toCurrency: receiveCurrency,
|
||||
fromAmount: depositAmount.replaceAll(',', '.'),
|
||||
toAmount: receiveAmount.replaceAll(',', '.'),
|
||||
refundAddress: depositAddress,
|
||||
toAddress: receiveAddress,
|
||||
isFixedRate: isFixedRateMode,
|
||||
);
|
||||
|
||||
var amount = isFixedRateMode ? receiveAmount : depositAmount;
|
||||
amount = amount.replaceAll(',', '.');
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "ﺔﻠﻣﺎﻌﻤﻟﺍ ﻊﻴﻗﻮﺗ ءﺎﻨﺛﺃ ﺄﻄﺧ ﺙﺪﺣ",
|
||||
"estimated": "مُقدَّر",
|
||||
"estimated_new_fee": "رسوم جديدة مقدرة",
|
||||
"estimated_receive_amount": "مقدرة المبلغ الاستقبال",
|
||||
"etherscan_history": "Etherscan تاريخ",
|
||||
"event": "ﺙﺪﺣ",
|
||||
"events": "ﺙﺍﺪﺣﻷﺍ",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "Възникна грешка при подписване на транзакция",
|
||||
"estimated": "Изчислено",
|
||||
"estimated_new_fee": "Прогнозна нова такса",
|
||||
"estimated_receive_amount": "Прогнозна сума за получаване",
|
||||
"etherscan_history": "История на Etherscan",
|
||||
"event": "Събитие",
|
||||
"events": "събития",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "Při podepisování transakce došlo k chybě",
|
||||
"estimated": "Odhadováno",
|
||||
"estimated_new_fee": "Odhadovaný nový poplatek",
|
||||
"estimated_receive_amount": "Odhadovaná částka přijímání",
|
||||
"etherscan_history": "Historie Etherscanu",
|
||||
"event": "událost",
|
||||
"events": "Události",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "Beim Signieren der Transaktion ist ein Fehler aufgetreten",
|
||||
"estimated": "Geschätzt",
|
||||
"estimated_new_fee": "Geschätzte neue Gebühr",
|
||||
"estimated_receive_amount": "Geschätzter Empfangsbetrag",
|
||||
"etherscan_history": "Etherscan-Geschichte",
|
||||
"event": "Ereignis",
|
||||
"events": "Veranstaltungen",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "An error has occured while signing transaction",
|
||||
"estimated": "Estimated",
|
||||
"estimated_new_fee": "Estimated new fee",
|
||||
"estimated_receive_amount": "Estimated receive amount",
|
||||
"etherscan_history": "Etherscan history",
|
||||
"event": "Event",
|
||||
"events": "Events",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "Se ha producido un error al firmar la transacción.",
|
||||
"estimated": "Estimado",
|
||||
"estimated_new_fee": "Nueva tarifa estimada",
|
||||
"estimated_receive_amount": "Cantidad de recepción estimada",
|
||||
"etherscan_history": "historia de etherscan",
|
||||
"event": "Evento",
|
||||
"events": "Eventos",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "Une erreur s'est produite lors de la signature de la transaction",
|
||||
"estimated": "Estimé",
|
||||
"estimated_new_fee": "De nouveaux frais estimés",
|
||||
"estimated_receive_amount": "Recevoir estimé le montant",
|
||||
"etherscan_history": "Historique Etherscan",
|
||||
"event": "Événement",
|
||||
"events": "Événements",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "An sami kuskure yayin sanya hannu kan ciniki",
|
||||
"estimated": "Kiyasta",
|
||||
"estimated_new_fee": "An kiyasta sabon kudin",
|
||||
"estimated_receive_amount": "Kiyasta samun adadin",
|
||||
"etherscan_history": "Etherscan tarihin kowane zamani",
|
||||
"event": "Lamarin",
|
||||
"events": "Abubuwan da suka faru",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "लेन-देन पर हस्ताक्षर करते समय एक त्रुटि उत्पन्न हुई है",
|
||||
"estimated": "अनुमानित",
|
||||
"estimated_new_fee": "अनुमानित नया शुल्क",
|
||||
"estimated_receive_amount": "अनुमानित राशि",
|
||||
"etherscan_history": "इथरस्कैन इतिहास",
|
||||
"event": "आयोजन",
|
||||
"events": "आयोजन",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "Došlo je do pogreške prilikom potpisivanja transakcije",
|
||||
"estimated": "procijenjen",
|
||||
"estimated_new_fee": "Procijenjena nova naknada",
|
||||
"estimated_receive_amount": "Procijenjeni iznos primanja",
|
||||
"etherscan_history": "Etherscan povijest",
|
||||
"event": "Događaj",
|
||||
"events": "Događaji",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "Terjadi kesalahan saat menandatangani transaksi",
|
||||
"estimated": "Diperkirakan",
|
||||
"estimated_new_fee": "Perkiraan biaya baru",
|
||||
"estimated_receive_amount": "Diperkirakan jumlah menerima",
|
||||
"etherscan_history": "Sejarah Etherscan",
|
||||
"event": "Peristiwa",
|
||||
"events": "Acara",
|
||||
|
|
|
@ -268,6 +268,7 @@
|
|||
"errorSigningTransaction": "Si è verificato un errore durante la firma della transazione",
|
||||
"estimated": "Stimato",
|
||||
"estimated_new_fee": "Nuova commissione stimata",
|
||||
"estimated_receive_amount": "Importo di ricezione stimato",
|
||||
"etherscan_history": "Storia Etherscan",
|
||||
"event": "Evento",
|
||||
"events": "Eventi",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "トランザクションの署名中にエラーが発生しました",
|
||||
"estimated": "推定",
|
||||
"estimated_new_fee": "推定新しい料金",
|
||||
"estimated_receive_amount": "推定受信金額",
|
||||
"etherscan_history": "イーサスキャンの歴史",
|
||||
"event": "イベント",
|
||||
"events": "イベント",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "거래에 서명하는 동안 오류가 발생했습니다.",
|
||||
"estimated": "예상",
|
||||
"estimated_new_fee": "예상 새로운 수수료",
|
||||
"estimated_receive_amount": "예상 수신 금액",
|
||||
"etherscan_history": "이더스캔 역사",
|
||||
"event": "이벤트",
|
||||
"events": "이벤트",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "ငွေပေးငွေယူ လက်မှတ်ထိုးစဉ် အမှားအယွင်းတစ်ခု ဖြစ်ပေါ်ခဲ့သည်။",
|
||||
"estimated": "ခန့်မှန်း",
|
||||
"estimated_new_fee": "ခန့်မှန်းသစ်ခန့်မှန်း",
|
||||
"estimated_receive_amount": "ခန့်မှန်းရရှိသောပမာဏ",
|
||||
"etherscan_history": "Etherscan သမိုင်း",
|
||||
"event": "ပွဲ",
|
||||
"events": "အဲ့ဒါနဲ့",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "Er is een fout opgetreden tijdens het ondertekenen van de transactie",
|
||||
"estimated": "Geschatte",
|
||||
"estimated_new_fee": "Geschatte nieuwe vergoeding",
|
||||
"estimated_receive_amount": "Geschat ontvangen bedrag",
|
||||
"etherscan_history": "Etherscan-geschiedenis",
|
||||
"event": "Evenement",
|
||||
"events": "Evenementen",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "Wystąpił błąd podczas podpisywania transakcji",
|
||||
"estimated": "Oszacowano",
|
||||
"estimated_new_fee": "Szacowana nowa opłata",
|
||||
"estimated_receive_amount": "Szacowana kwota otrzymania",
|
||||
"etherscan_history": "Historia Etherscanu",
|
||||
"event": "Wydarzenie",
|
||||
"events": "Wydarzenia",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "Ocorreu um erro ao assinar a transação",
|
||||
"estimated": "Estimado",
|
||||
"estimated_new_fee": "Nova taxa estimada",
|
||||
"estimated_receive_amount": "Valor estimado de recebimento",
|
||||
"etherscan_history": "história Etherscan",
|
||||
"event": "Evento",
|
||||
"events": "Eventos",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "Произошла ошибка при подписании транзакции",
|
||||
"estimated": "Примерно",
|
||||
"estimated_new_fee": "Расчетная новая плата",
|
||||
"estimated_receive_amount": "Расчетная сумма получения",
|
||||
"etherscan_history": "История Эфириума",
|
||||
"event": "Событие",
|
||||
"events": "События",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "เกิดข้อผิดพลาดขณะลงนามธุรกรรม",
|
||||
"estimated": "ประมาณการ",
|
||||
"estimated_new_fee": "ค่าธรรมเนียมใหม่โดยประมาณ",
|
||||
"estimated_receive_amount": "โดยประมาณว่าจำนวนเงินที่ได้รับ",
|
||||
"etherscan_history": "ประวัติอีเธอร์สแกน",
|
||||
"event": "เหตุการณ์",
|
||||
"events": "กิจกรรม",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "May naganap na error habang pinipirmahan ang transaksyon",
|
||||
"estimated": "Tinatayang",
|
||||
"estimated_new_fee": "Tinatayang bagong bayad",
|
||||
"estimated_receive_amount": "Tinatayang natanggap na halaga",
|
||||
"etherscan_history": "Kasaysayan ng Etherscan",
|
||||
"event": "Kaganapan",
|
||||
"events": "Mga kaganapan",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "İşlem imzalanırken bir hata oluştu",
|
||||
"estimated": "Tahmini",
|
||||
"estimated_new_fee": "Tahmini yeni ücret",
|
||||
"estimated_receive_amount": "Tahmini alma miktarı",
|
||||
"etherscan_history": "Etherscan geçmişi",
|
||||
"event": "Etkinlik",
|
||||
"events": "Olaylar",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "Під час підписання транзакції сталася помилка",
|
||||
"estimated": "Приблизно ",
|
||||
"estimated_new_fee": "Орієнтовна нова комісія",
|
||||
"estimated_receive_amount": "Орієнтовна сума отримує",
|
||||
"etherscan_history": "Історія Etherscan",
|
||||
"event": "Подія",
|
||||
"events": "Події",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "۔ﮯﮨ ﯽﺌﮔﺁ ﺶﯿﭘ ﯽﺑﺍﺮﺧ ﮏﯾﺍ ﺖﻗﻭ ﮯﺗﺮﮐ ﻂﺨﺘﺳﺩ ﺮﭘ ﻦﯾﺩ ﻦﯿﻟ",
|
||||
"estimated": "تخمینہ لگایا",
|
||||
"estimated_new_fee": "تخمینہ شدہ نئی فیس",
|
||||
"estimated_receive_amount": "تخمینہ وصول کی رقم",
|
||||
"etherscan_history": "ﺦﯾﺭﺎﺗ ﯽﮐ ﻦﯿﮑﺳﺍ ﺮﮭﺘﯾﺍ",
|
||||
"event": "ﺐﯾﺮﻘﺗ",
|
||||
"events": "ﺕﺎﺒﯾﺮﻘﺗ",
|
||||
|
|
|
@ -268,6 +268,7 @@
|
|||
"errorSigningTransaction": "Aṣiṣe kan ti waye lakoko ti o fowo si iṣowo",
|
||||
"estimated": "Ó tó a fojú díwọ̀n",
|
||||
"estimated_new_fee": "Ifoju tuntun owo tuntun",
|
||||
"estimated_receive_amount": "Ifoju gba iye",
|
||||
"etherscan_history": "Etherscan itan",
|
||||
"event": "Iṣẹlẹ",
|
||||
"events": "Awọn iṣẹlẹ",
|
||||
|
|
|
@ -267,6 +267,7 @@
|
|||
"errorSigningTransaction": "签署交易时发生错误",
|
||||
"estimated": "估计值",
|
||||
"estimated_new_fee": "估计新费用",
|
||||
"estimated_receive_amount": "估计接收金额",
|
||||
"etherscan_history": "以太扫描历史",
|
||||
"event": "事件",
|
||||
"events": "活动",
|
||||
|
|
|
@ -15,15 +15,15 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN)
|
|||
APP_ANDROID_TYPE=$1
|
||||
|
||||
MONERO_COM_NAME="Monero.com"
|
||||
MONERO_COM_VERSION="1.16.0"
|
||||
MONERO_COM_BUILD_NUMBER=94
|
||||
MONERO_COM_VERSION="1.16.1"
|
||||
MONERO_COM_BUILD_NUMBER=95
|
||||
MONERO_COM_BUNDLE_ID="com.monero.app"
|
||||
MONERO_COM_PACKAGE="com.monero.app"
|
||||
MONERO_COM_SCHEME="monero.com"
|
||||
|
||||
CAKEWALLET_NAME="Cake Wallet"
|
||||
CAKEWALLET_VERSION="4.19.0"
|
||||
CAKEWALLET_BUILD_NUMBER=220
|
||||
CAKEWALLET_VERSION="4.19.1"
|
||||
CAKEWALLET_BUILD_NUMBER=221
|
||||
CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet"
|
||||
CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet"
|
||||
CAKEWALLET_SCHEME="cakewallet"
|
||||
|
|
|
@ -13,13 +13,13 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN)
|
|||
APP_IOS_TYPE=$1
|
||||
|
||||
MONERO_COM_NAME="Monero.com"
|
||||
MONERO_COM_VERSION="1.16.0"
|
||||
MONERO_COM_BUILD_NUMBER=92
|
||||
MONERO_COM_VERSION="1.16.1"
|
||||
MONERO_COM_BUILD_NUMBER=93
|
||||
MONERO_COM_BUNDLE_ID="com.cakewallet.monero"
|
||||
|
||||
CAKEWALLET_NAME="Cake Wallet"
|
||||
CAKEWALLET_VERSION="4.19.0"
|
||||
CAKEWALLET_BUILD_NUMBER=254
|
||||
CAKEWALLET_VERSION="4.19.1"
|
||||
CAKEWALLET_BUILD_NUMBER=256
|
||||
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"
|
||||
|
||||
HAVEN_NAME="Haven"
|
||||
|
|
|
@ -19,6 +19,7 @@ NPROC="-j$(sysctl -n hw.logicalcpu)"
|
|||
for COIN in monero wownero;
|
||||
do
|
||||
pushd ../monero_c
|
||||
rm -rf external/ios/build
|
||||
./build_single.sh ${COIN} host-apple-ios $NPROC
|
||||
popd
|
||||
done
|
||||
|
|
|
@ -16,13 +16,13 @@ if [ -n "$1" ]; then
|
|||
fi
|
||||
|
||||
MONERO_COM_NAME="Monero.com"
|
||||
MONERO_COM_VERSION="1.6.0"
|
||||
MONERO_COM_BUILD_NUMBER=24
|
||||
MONERO_COM_VERSION="1.6.1"
|
||||
MONERO_COM_BUILD_NUMBER=26
|
||||
MONERO_COM_BUNDLE_ID="com.cakewallet.monero"
|
||||
|
||||
CAKEWALLET_NAME="Cake Wallet"
|
||||
CAKEWALLET_VERSION="1.12.0"
|
||||
CAKEWALLET_BUILD_NUMBER=81
|
||||
CAKEWALLET_VERSION="1.12.1"
|
||||
CAKEWALLET_BUILD_NUMBER=82
|
||||
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"
|
||||
|
||||
if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then
|
||||
|
|
|
@ -8,7 +8,7 @@ if [[ ! -d "monero_c" ]];
|
|||
then
|
||||
git clone https://github.com/mrcyjanek/monero_c --branch rewrite-wip
|
||||
cd monero_c
|
||||
git checkout d1e246aaf4c53b60ff9e4ab4a4ac3ae4a1f94a33
|
||||
git checkout c094ed5da69d2274747bf6edd7ca24124487bd34
|
||||
git reset --hard
|
||||
git submodule update --init --force --recursive
|
||||
./apply_patches.sh monero
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#define MyAppName "Cake Wallet"
|
||||
#define MyAppVersion "0.0.2"
|
||||
#define MyAppVersion "0.0.3"
|
||||
#define MyAppPublisher "Cake Labs LLC"
|
||||
#define MyAppURL "https://cakewallet.com/"
|
||||
#define MyAppExeName "CakeWallet.exe"
|
||||
|
|
Loading…
Reference in a new issue