Commit graph

93 commits

Author SHA1 Message Date
OmarHatem
e67b484613 - Fix RangeError due to changes in _tradeAvailableProviders while the Futures complete
- Silently catch "Concurrent modification during iteration"
2023-02-07 23:48:10 +02:00
Serhii
cce56a61a3 minor fixes 2023-01-26 13:33:33 +02:00
Serhii
4636aacae7 formatting 2023-01-16 17:31:31 +02:00
Serhii
b4249f21a9 add payout address item to confirmation screen 2023-01-16 17:27:49 +02:00
Serhii
7f37bd3d59 update localization files 2023-01-14 23:29:47 +02:00
OmarHatem
1ef8ef269c Merge branch 'main' of https://github.com/cake-tech/cake_wallet into CW-118-Allow-disabling-of-fiat 2022-12-08 21:17:59 +02:00
OmarHatem
4b1e9a10eb - Rename calculateAmount to fetchRate to be more descriptive
- Add Disable Exchange change reaction to save in shared prefs [skip ci]
2022-12-08 21:14:42 +02:00
OmarHatem
55b37164dc - Make getters to ease attribute access
- Add the old 'disable_fiat' translation
- rename getters to be more bool like names
2022-12-07 22:07:32 +02:00
OmarHatem
0da48f66fe Delegate returning rate to each provider to handle its logic internally 2022-12-07 21:09:15 +02:00
OmarHatem
8ff8cf38b8 Check if the provider supportsFixedRate only if fixed rate is applied [skip ci] 2022-12-07 18:15:30 +02:00
OmarHatem
f14c01303f - Add whether this provide supports fixed rate or not
- Fix Change now fixed rate exchange due to wrong rate id
2022-12-06 19:23:46 +02:00
Serhii
214c1fe0db Merge branch 'main' into CW-118-Allow-disabling-of-fiat 2022-12-06 17:37:12 +02:00
OmarHatem
36c2702688 - Recalculate best rate if isFixedRate changed
- check limits against the receive amount if isFixedRate
2022-12-06 13:30:11 +02:00
Omar Hatem
707df3717d
Merge pull request #662 from cake-tech/CW-259-fix-change-now-trade
[CW-259] Fix Change now trade issue
2022-12-03 23:49:45 +02:00
OmarHatem
116e468581 calculate best rate based on deposit/receive amount 2022-12-02 23:20:06 +02:00
OmarHatem
3bcd31ac44 calculate best rate based on min/max amount 2022-12-02 20:38:16 +02:00
OmarHatem
091ac41ee2 allow null minimum amount in limits 2022-12-01 22:37:13 +02:00
OmarHatem
dd99508d3e Fix static amount value for determining best rate and replace it with the input the user types 2022-12-01 22:11:51 +02:00
Godwin Asuquo
3acbfbae79 Fix issues from code review 2022-11-25 22:51:07 +02:00
Serhii
50d32021f6 Merge branch 'main' into CW-118-Allow-disabling-of-fiat 2022-11-22 19:48:43 +02:00
Serhii
92328c4102 move logic to viewmodels 2022-11-22 19:33:24 +02:00
Omar Hatem
bcf09b048c
Cw 220 fix grey exchange screen (#641)
* Fix nullability issue for ChangeNow rateId

* Handle concurrent modification error from Splay Tree
2022-11-21 20:52:03 -05:00
mkyq
3ec414ae66
Add adapters for some of bitcoin, litecoin and monero transactions priorities. Replace direct calls of transaction priorities for exchange_view_model. (#593) 2022-11-03 19:13:13 -04:00
Serhii
a52f47220e
show warning if exchanging with slow fee (#579)
* show warning if exchanging with slow fee

* Update setDefaultTransactionPriority for return type void; update for use MoneroTransactionPriority.automatic instead of MoneroTransactionPriority.regular.

Co-authored-by: M <m@cakewallet.com>
2022-11-03 15:21:35 -04:00
Omar Hatem
7e7217008c
Cw 171 exchange auto selector bug (#523)
* Fix de-selecting exchange providers not getting saved

* only change field value when the amount is better than the already existing one

* Show calculated amount after getting the best value from all providers

* Catch exceptions to avoid stopping the providers calculate amount APIs

* Fix Splay map only saving the last value obtained

* Show limits for the provider with the highest rate

* Load limits on currency pair change

* Show limits for lowest min provider

* Show limits for lowest min and highest max

* Sync best rate every 10 seconds instead of calculating it on every amount change

* Fix conflicts with flutter upgrade
Add null safety to changes in exchange_view_model.dart

* Remove un-necessary checks
2022-10-20 13:47:36 -04:00
M
1beb18b045 Flutter upgrade 2022-10-12 13:09:57 -04:00
Serhii
f59c2fbd2b
add new coins to exchange (#499)
* add new coins

APE, AVAXC, BTT, BTTBSC, DOGE, FIRO, USDTTRC20, HBAR, SC, SOL, USDC, USDCSOL, ZEN, XVG

* remove UST icon

* remove xhv from excludeDepositCurrencies

* remove xhv from excludeReceiveCurrencies
2022-09-07 13:10:21 +01:00
Omar Hatem
244d20d1b6
Skip unsupported providers when calculating best rate provider (#500) 2022-09-07 12:43:03 +01:00
mkyq
04be884357
Enable exchange for haven wallets. (#495) 2022-09-01 19:46:14 +01:00
Omar Hatem
c50eeee58b
CW 68 exchange automatic rate selector (#472)
* Add 'Exchange provider picker'
Save user selections

* Save user's exchange providers selection

* Add text for selected providers availability

* Fix selected providers not updating

* Load limits based on highest maximum in the selected providers

* Change received and deposit amount to be the best value from the selected providers

* Add provider name next to Trade ID
Set selected provider based on amount calculated

* Grey out providers who doesn't support selected currency pair

* Fix disabled providers

* Add Provider logo in Confirm Screen

* Only choose a provider if it satisfies its limits

* Fix amount validation

* Fix typo in error message

* Add a queue of possible exchange providers sorted by the best rate to try next if one failed

* Fix string locale typo

* Add Localization for other languages

* Add Placeholder text when there are no providers selected

* Check Exchange provider availability before creating a trade

* Fix "Fixed Rate" changing unconditionally

* Enable "convert to" field regardless of the provider

* Remove "Choose one" from providers picker

* Merge Master

* Fix Conflicts with master

* Add missing isEnabled field in simple swap provider
2022-09-01 15:12:38 +01:00
Godwin Asuquo
d9905a7cf3
Cw 110 integrate simple swap exchange (#459)
* add support for SimpleSwap exchange

* fix edit receive amount field

* fixed merge conflicts

* Fix issues from code review
2022-08-31 16:34:07 +01:00
Godwin Asuquo
6378d052ac
Cw 72 implement sideshift exchange (#332)
* add sideshift exchange provider

* add secret key

* Fix issues

* Fix issues

* refactor code

* add permission checks to side shift

* fix formatting issues
2022-04-13 14:28:21 +01:00
M
718ef91749 Exclude xhv from exchange currencies list 2022-04-01 14:31:05 +01:00
mkyq
01150ef2a7
Hv (#295)
* hv
* Change build version
2022-03-30 17:57:04 +02:00
M
989ef442ac Fixes for litecoin transactions. Change fixed rate mode for exchange. 2022-01-27 11:20:51 +02:00
M
02de3104eb Fixed rate for changenow. 2022-01-26 17:44:15 +02:00
M
e6b1da376d Configure wallet types for the app 2021-12-24 14:41:34 +02:00
OleksandrSobol
1e3ec8da1c CAKE-345 | added monero_output.dart to the app; fixed transaction_history.dart; renamed SendItem on Output; calculated formattedCryptoAmount in the output.dart; used outputs list instead sendItemList; fixed bitcoin_transaction_credentials.dart, electrum_wallet.dart, monero_transaction_creation_credentials.dart, monero_wallet.dart, exchange and send pages, view models 2021-08-10 17:52:35 +03:00
OleksandrSobol
3abb78febf Merge branch 'main' into CAKE-345-batch-sending
# Conflicts:
#	lib/bitcoin/electrum_wallet.dart
2021-08-04 17:43:03 +03:00
OleksandrSobol
1d996c94c8 CAKE-343 | added address book button to xmr wallet's address text field on exchange_page.dart and exchange_template_page.dart 2021-07-23 14:05:33 +03:00
OleksandrSobol
2a047e1f51 Merge branch 'release-4.2.4' into CAKE-345-batch-sending
# Conflicts:
#	lib/bitcoin/electrum_wallet.dart
#	lib/src/screens/send/send_page.dart
#	lib/src/screens/send/send_template_page.dart
#	lib/view_model/send/send_view_model.dart
#	res/values/strings_de.arb
#	res/values/strings_en.arb
#	res/values/strings_es.arb
#	res/values/strings_hi.arb
#	res/values/strings_hr.arb
#	res/values/strings_it.arb
#	res/values/strings_ja.arb
#	res/values/strings_ko.arb
#	res/values/strings_nl.arb
#	res/values/strings_pl.arb
#	res/values/strings_pt.arb
#	res/values/strings_ru.arb
#	res/values/strings_uk.arb
#	res/values/strings_zh.arb
2021-07-22 17:52:48 +03:00
OleksandrSobol
e6cfa2b636 CAKE-345 | reworked send page for batch sending; added send_item.dart, send_card.dart, send_template_view_model.dart and parse_address_from_domain_alert.dart to the app; reworked send template page; fixed exchange_trade_page.dart and exchange_trade_view_model.dart 2021-07-16 12:32:36 +03:00
OleksandrSobol
0d367c4b45 CAKE-343 | added bitcoin_wallet_addresses.dart and litecoin_wallet_addresses.dart tj the app; moved addresses from wallets to wallet addresses classes; deleted wallet addresses credentials 2021-07-13 08:46:34 +03:00
OleksandrSobol
1fccb0b546 Merge branch 'main' into CAKE-306-add-moonpay-option-for-btc-buying
# Conflicts:
#	lib/buy/wyre/wyre_buy_provider.dart
#	lib/di.dart
#	lib/src/screens/dashboard/dashboard_page.dart
#	lib/view_model/dashboard/dashboard_view_model.dart
#	res/values/strings_de.arb
#	res/values/strings_en.arb
#	res/values/strings_es.arb
#	res/values/strings_hi.arb
#	res/values/strings_ja.arb
#	res/values/strings_ko.arb
#	res/values/strings_nl.arb
#	res/values/strings_pl.arb
#	res/values/strings_pt.arb
#	res/values/strings_ru.arb
#	res/values/strings_uk.arb
#	res/values/strings_zh.arb
2021-05-28 12:06:50 +03:00
M
2b4248e30b Merged main into ltc. 2021-05-10 19:51:13 +03:00
M
1330966794 Reworked electrum wallet. Added Litecoin wallet. 2021-05-07 10:36:38 +03:00
OleksandrSobol
3675350452 CAKE-314 | changed bnb crypto currency to bnb bep2; removed bnb bep2 from receive currency list on exchange page 2021-04-30 12:46:15 +03:00
OleksandrSobol
1c976bfaa1 CAKE-306 | applied _saveOrder() to buy_webview_page.dart; fixed moonpay_buy_provider.dart and wyre_buy_provider.dart; canceled timers on exchange_trade_page.dart, order_details_page.dart and trade_details_page.dart; reworked pre_order_page.dart 2021-04-15 20:10:23 +03:00
OleksandrSobol
68c12cbb79 CAKE-296 | added receiveCurrencies (list of crypto currencies without xlm and xrp) to exchange_view_model.dart; applied receiveCurrencies to receive card in the exchange_page.dart 2021-04-06 20:11:26 +03:00
OleksandrSobol
753d164d6e CAKE-296 | removed xmr to xrp and xmr to xlm exchange pairs from ChangeNow pair list; disabled exchange button when pair is not exists 2021-04-01 21:08:11 +03:00