diff --git a/assets/images/ape_icon.png b/assets/images/ape_icon.png new file mode 100644 index 000000000..b9c3d9c34 Binary files /dev/null and b/assets/images/ape_icon.png differ diff --git a/assets/images/avaxc_icon.png b/assets/images/avaxc_icon.png new file mode 100644 index 000000000..728b19fc3 Binary files /dev/null and b/assets/images/avaxc_icon.png differ diff --git a/assets/images/btt_icon.png b/assets/images/btt_icon.png new file mode 100644 index 000000000..253c01d1c Binary files /dev/null and b/assets/images/btt_icon.png differ diff --git a/assets/images/bttbsc_icon.png b/assets/images/bttbsc_icon.png new file mode 100644 index 000000000..253c01d1c Binary files /dev/null and b/assets/images/bttbsc_icon.png differ diff --git a/assets/images/doge_icon.png b/assets/images/doge_icon.png new file mode 100644 index 000000000..b6292c16c Binary files /dev/null and b/assets/images/doge_icon.png differ diff --git a/assets/images/firo_icon.png b/assets/images/firo_icon.png new file mode 100644 index 000000000..076d8421b Binary files /dev/null and b/assets/images/firo_icon.png differ diff --git a/assets/images/hbar_icon.png b/assets/images/hbar_icon.png new file mode 100644 index 000000000..ad21e7384 Binary files /dev/null and b/assets/images/hbar_icon.png differ diff --git a/assets/images/nano_icon.png b/assets/images/nano_icon.png new file mode 100644 index 000000000..8937b8ed2 Binary files /dev/null and b/assets/images/nano_icon.png differ diff --git a/assets/images/sc_icon.png b/assets/images/sc_icon.png new file mode 100644 index 000000000..5ff4b2e21 Binary files /dev/null and b/assets/images/sc_icon.png differ diff --git a/assets/images/sol_icon.png b/assets/images/sol_icon.png new file mode 100644 index 000000000..c9a9f3b6a Binary files /dev/null and b/assets/images/sol_icon.png differ diff --git a/assets/images/usdc_icon.png b/assets/images/usdc_icon.png new file mode 100644 index 000000000..283533b42 Binary files /dev/null and b/assets/images/usdc_icon.png differ diff --git a/assets/images/usdcsol_icon.png b/assets/images/usdcsol_icon.png new file mode 100644 index 000000000..283533b42 Binary files /dev/null and b/assets/images/usdcsol_icon.png differ diff --git a/assets/images/usdttrc20_icon.png b/assets/images/usdttrc20_icon.png new file mode 100644 index 000000000..4d3f15688 Binary files /dev/null and b/assets/images/usdttrc20_icon.png differ diff --git a/assets/images/xvg_icon.png b/assets/images/xvg_icon.png new file mode 100644 index 000000000..2e415ecf1 Binary files /dev/null and b/assets/images/xvg_icon.png differ diff --git a/assets/images/zaddr_icon.png b/assets/images/zaddr_icon.png index 139acf84c..095ad2c56 100644 Binary files a/assets/images/zaddr_icon.png and b/assets/images/zaddr_icon.png differ diff --git a/assets/images/zec_icon.png b/assets/images/zec_icon.png index 139acf84c..095ad2c56 100644 Binary files a/assets/images/zec_icon.png and b/assets/images/zec_icon.png differ diff --git a/assets/images/zen_icon.png b/assets/images/zen_icon.png new file mode 100644 index 000000000..2060a0d22 Binary files /dev/null and b/assets/images/zen_icon.png differ diff --git a/cw_core/lib/crypto_currency.dart b/cw_core/lib/crypto_currency.dart index fead230d9..8baca39a1 100644 --- a/cw_core/lib/crypto_currency.dart +++ b/cw_core/lib/crypto_currency.dart @@ -23,16 +23,32 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> { CryptoCurrency.eos, CryptoCurrency.eth, CryptoCurrency.ltc, + CryptoCurrency.nano, CryptoCurrency.trx, CryptoCurrency.usdt, CryptoCurrency.usdterc20, CryptoCurrency.xlm, CryptoCurrency.xrp, CryptoCurrency.xhv, - //CryptoCurrency.zaddr, - //CryptoCurrency.zec + CryptoCurrency.ape, + CryptoCurrency.avaxc, + CryptoCurrency.btt, + CryptoCurrency.bttbsc, + CryptoCurrency.doge, + CryptoCurrency.firo, + CryptoCurrency.usdttrc20, + CryptoCurrency.hbar, + CryptoCurrency.sc, + CryptoCurrency.sol, + CryptoCurrency.usdc, + CryptoCurrency.usdcsol, + CryptoCurrency.zaddr, + CryptoCurrency.zec, + CryptoCurrency.zen, + CryptoCurrency.xvg, ]; - static const xmr = CryptoCurrency(title: 'XMR', iconPath: 'assets/images/monero_icon.png', name: 'Monero', raw: 0); + + static const xmr = CryptoCurrency(title: 'XMR', iconPath: 'assets/images/monero_icon.png', name: 'Monero', raw: 0); static const ada = CryptoCurrency(title: 'ADA', iconPath: 'assets/images/ada_icon.png', name: 'Cardano', raw: 1); static const bch = CryptoCurrency(title: 'BCH', iconPath: 'assets/images/bch_icon.png',name: 'Bitcoin Cash', raw: 2); static const bnb = CryptoCurrency(title: 'BNB', iconPath: 'assets/images/bnb_icon.png', tag: 'BSC', name: 'Binance Coin', raw: 3); @@ -41,7 +57,7 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> { static const dash = CryptoCurrency(title: 'DASH', iconPath: 'assets/images/dash_icon.png', name: 'Dash', raw: 6); static const eos = CryptoCurrency(title: 'EOS', iconPath: 'assets/images/eos_icon.png', name: 'EOS', raw: 7); static const eth = CryptoCurrency(title: 'ETH', iconPath: 'assets/images/eth_icon.png', name: 'Ethereum', raw: 8); - static const ltc = CryptoCurrency(title: 'LTC', iconPath: 'assets/images/litecoin-ltc_icon.png', name: 'Litecoin',raw: 9); + static const ltc = CryptoCurrency(title: 'LTC', iconPath: 'assets/images/litecoin-ltc_icon.png', name: 'Litecoin', raw: 9); static const nano = CryptoCurrency(title: 'NANO', raw: 10); static const trx = CryptoCurrency(title: 'TRX', iconPath: 'assets/images/trx_icon.png', name: 'TRON', raw: 11); static const usdt = CryptoCurrency(title: 'USDT', iconPath: 'assets/images/usdt_icon.png', tag: 'OMNI', name: 'USDT', raw: 12); @@ -64,8 +80,25 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> { static const xnzd = CryptoCurrency(title: 'XNZD', tag: 'XHV', raw: 28); static const xusd = CryptoCurrency(title: 'XUSD', tag: 'XHV', raw: 29); - static const zaddr = CryptoCurrency(title: 'ZZEC', tag: 'ZEC', name: 'Shielded Zcash', iconPath: 'assets/images/zaddr_icon.png', raw: 30); - static const zec = CryptoCurrency(title: 'TZEC', tag: 'ZEC', name: 'Transparent Zcash', iconPath: 'assets/images/zec_icon.png', raw: 31); + static const ape = CryptoCurrency(title: 'APE', iconPath: 'assets/images/ape_icon.png', raw: 30); + static const avaxc = CryptoCurrency(title: 'AVAXC', iconPath: 'assets/images/avaxc_icon.png', raw: 31); + static const btt = CryptoCurrency(title: 'BTT', iconPath: 'assets/images/btt_icon.png', raw: 32); + static const bttbsc = CryptoCurrency(title: 'BTTBSC', iconPath: 'assets/images/bttbsc_icon.png', raw: 33); + static const doge = CryptoCurrency(title: 'DOGE', iconPath: 'assets/images/doge_icon.png', raw: 34); + static const firo = CryptoCurrency(title: 'FIRO', iconPath: 'assets/images/firo_icon.png', raw: 35); + static const usdttrc20 = CryptoCurrency(title: 'USDTTRC20', iconPath: 'assets/images/usdttrc20_icon.png', raw: 36); + static const hbar = CryptoCurrency(title: 'HBAR', iconPath: 'assets/images/hbar_icon.png', raw: 37); + static const sc = CryptoCurrency(title: 'SC', iconPath: 'assets/images/sc_icon.png', raw: 38); + static const sol = CryptoCurrency(title: 'SOL', iconPath: 'assets/images/sol_icon.png', raw: 39); + static const usdc = CryptoCurrency(title: 'USDC', iconPath: 'assets/images/usdc_icon.png', raw: 40); + static const usdcsol = CryptoCurrency(title: 'USDCSOL', iconPath: 'assets/images/usdcsol_icon.png', raw: 41); + static const zaddr = CryptoCurrency(title: 'ZZEC', tag: 'ZEC', name: 'Shielded Zcash', iconPath: 'assets/images/zaddr_icon.png', raw: 42); + static const zec = CryptoCurrency(title: 'TZEC', tag: 'ZEC', name: 'Transparent Zcash', iconPath: 'assets/images/zec_icon.png', raw: 43); + static const zen = CryptoCurrency(title: 'ZEN', iconPath: 'assets/images/zen_icon.png', raw: 44); + static const xvg = CryptoCurrency(title: 'XVG', name: 'Verge', iconPath: 'assets/images/xvg_icon.png', raw: 45); + + + static CryptoCurrency deserialize({int raw}) { switch (raw) { @@ -130,9 +163,37 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> { case 29: return CryptoCurrency.xusd; case 30: - return CryptoCurrency.zaddr; + return CryptoCurrency.ape; case 31: + return CryptoCurrency.avaxc; + case 32: + return CryptoCurrency.btt; + case 33: + return CryptoCurrency.bttbsc; + case 34: + return CryptoCurrency.doge; + case 35: + return CryptoCurrency.firo; + case 36: + return CryptoCurrency.usdttrc20; + case 37: + return CryptoCurrency.hbar; + case 38: + return CryptoCurrency.sc; + case 39: + return CryptoCurrency.sol; + case 40: + return CryptoCurrency.usdc; + case 41: + return CryptoCurrency.usdcsol; + case 42: + return CryptoCurrency.zaddr; + case 43: return CryptoCurrency.zec; + case 44: + return CryptoCurrency.zen; + case 45: + return CryptoCurrency.xvg; default: return null; } @@ -164,8 +225,8 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> { return CryptoCurrency.nano; case 'trx': return CryptoCurrency.trx; - case 'usdt': - return CryptoCurrency.usdt; + case 'usdc': + return CryptoCurrency.usdc; case 'usdterc20': return CryptoCurrency.usdterc20; case 'xlm': @@ -200,10 +261,38 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> { return CryptoCurrency.xnzd; case 'xusd': return CryptoCurrency.xusd; + case 'ape': + return CryptoCurrency.ape; + case 'avax': + return CryptoCurrency.avaxc; + case 'btt': + return CryptoCurrency.btt; + case 'bttbsc': + return CryptoCurrency.bttbsc; + case 'doge': + return CryptoCurrency.doge; + case 'firo': + return CryptoCurrency.firo; + case 'usdttrc20': + return CryptoCurrency.usdttrc20; + case 'hbar': + return CryptoCurrency.hbar; + case 'sc': + return CryptoCurrency.sc; + case 'sol': + return CryptoCurrency.sol; + case 'usdt': + return CryptoCurrency.usdt; + case 'usdcsol': + return CryptoCurrency.usdcsol; case 'zaddr': return CryptoCurrency.zaddr; case 'zec': return CryptoCurrency.zec; + case 'zen': + return CryptoCurrency.zen; + case 'xvg': + return CryptoCurrency.xvg; default: return null; } @@ -211,4 +300,4 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> { @override String toString() => title; -} +} \ No newline at end of file diff --git a/lib/exchange/changenow/changenow_exchange_provider.dart b/lib/exchange/changenow/changenow_exchange_provider.dart index e02ae66a9..c004f327a 100644 --- a/lib/exchange/changenow/changenow_exchange_provider.dart +++ b/lib/exchange/changenow/changenow_exchange_provider.dart @@ -96,12 +96,12 @@ class ChangeNowExchangeProvider extends ExchangeProvider { 'Content-Type': 'application/json'}; final flow = getFlow(isFixedRateMode); final body = <String, String>{ - 'fromCurrency': normalizeCryptoCurrency(_request.from), + 'fromCurrency': normalizeCryptoCurrency(_request.from), 'toCurrency': normalizeCryptoCurrency(_request.to), 'fromNetwork': networkFor(_request.from), 'toNetwork': networkFor(_request.to), - 'fromAmount': _request.fromAmount, - 'toAmount': _request.toAmount, + 'fromAmount': _request.fromAmount, + 'toAmount': _request.toAmount, 'address': _request.address, 'flow': flow, 'refundAddress': _request.refundAddress diff --git a/lib/src/screens/exchange/widgets/currency_picker_item_widget.dart b/lib/src/screens/exchange/widgets/currency_picker_item_widget.dart index b710494fd..a23b88c10 100644 --- a/lib/src/screens/exchange/widgets/currency_picker_item_widget.dart +++ b/lib/src/screens/exchange/widgets/currency_picker_item_widget.dart @@ -69,6 +69,5 @@ class PickerItemWidget extends StatelessWidget { ), ), ); - ; } } diff --git a/lib/view_model/exchange/exchange_view_model.dart b/lib/view_model/exchange/exchange_view_model.dart index 8ae653e5a..557e3188d 100644 --- a/lib/view_model/exchange/exchange_view_model.dart +++ b/lib/view_model/exchange/exchange_view_model.dart @@ -40,8 +40,9 @@ class ExchangeViewModel = ExchangeViewModelBase with _$ExchangeViewModel; abstract class ExchangeViewModelBase with Store { ExchangeViewModelBase(this.wallet, this.trades, this._exchangeTemplateStore, this.tradesStore, this._settingsStore, this.sharedPreferences) { - const excludeDepositCurrencies = <CryptoCurrency>[]; - const excludeReceiveCurrencies = [CryptoCurrency.xlm, CryptoCurrency.xrp, CryptoCurrency.bnb]; + const excludeDepositCurrencies = [CryptoCurrency.btt, CryptoCurrency.nano]; + const excludeReceiveCurrencies = [CryptoCurrency.xlm, CryptoCurrency.xrp, + CryptoCurrency.bnb, CryptoCurrency.btt, CryptoCurrency.nano]; providerList = [ChangeNowExchangeProvider(), SideShiftExchangeProvider(), SimpleSwapExchangeProvider()]; _initialPairBasedOnWallet(); currentTradeAvailableProviders = SplayTreeMap<double, ExchangeProvider>();