mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
CW-674: Enhance Exchange Flow - Add estimated receive amount and amount currency to Confirm Sending Details Page (#1547)
* fix: Improve exchange flow by adding a timeout to the call to fetch rate from providers * fix: Adjust time limit for fetching rate to 7 seconds and add timelimit to fetching limits * fix: Make fetch limits a Future.wait * feat: Add currency for amount and estimated receive amount to confirm sending page for exchange * fix: Remove unneeded code * fix: Modify receive amount to reflect value coming from the individual exchange providers if available and ensure receiveAmount is calculated based on selected exchange provider's rate
This commit is contained in:
parent
1b109ac702
commit
5c9f176d18
38 changed files with 174 additions and 122 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue